--HG--
branch : trunk
This commit is contained in:
megamage
2009-02-26 20:43:35 -06:00
24 changed files with 415 additions and 204 deletions

View File

@@ -53,17 +53,7 @@ void DynamicObject::AddToWorld()
void DynamicObject::RemoveFromWorld()
{
///- Remove the dynamicObject from the accessor
if(IsInWorld())
{
// Make sure the object is back to grid container for removal as farsight targets
// are switched to world container on creation and they are also set to active
if (isActive())
{
GetMap()->SwitchGridContainers(this, false);
setActive(false);
}
ObjectAccessor::Instance().RemoveObject(this);
}
if(IsInWorld()) ObjectAccessor::Instance().RemoveObject(this);
WorldObject::RemoveFromWorld();
}