*Update active object code.

--HG--
branch : trunk
This commit is contained in:
megamage
2009-02-26 16:29:55 -06:00
parent c16848a23c
commit ee6418d92a
8 changed files with 56 additions and 37 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 (isActiveObject())
{
GetMap()->SwitchGridContainers(this, false);
setActive(false);
}
ObjectAccessor::Instance().RemoveObject(this);
}
if(IsInWorld()) ObjectAccessor::Instance().RemoveObject(this);
WorldObject::RemoveFromWorld();
}