*Update active object code.

--HG--
branch : trunk
This commit is contained in:
megamage committed 2009-02-26 16:29:55 -06:00
1 parent c16848a23c
commit ee6418d92a
8 files changed
+56 -37

No files matched your search

+1 -11
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();
}