*Only update object which are in world.

--HG--
branch : trunk
This commit is contained in:
megamage
2009-05-03 10:34:02 -05:00
parent bb4499887c
commit 558a5707ff
3 changed files with 4 additions and 3 deletions
+1 -1
View File
@@ -1724,7 +1724,7 @@ void Creature::Respawn()
//Call AI respawn virtual function
AI()->JustRespawned();
GetMap()->Add(this);
//GetMap()->Add(this);
}
}
+2 -1
View File
@@ -200,7 +200,8 @@ ObjectUpdater::Visit(GridRefManager<T> &m)
{
for(typename GridRefManager<T>::iterator iter = m.begin(); iter != m.end(); ++iter)
{
iter->getSource()->Update(i_timeDiff);
if(iter->getSource()->IsInWorld())
iter->getSource()->Update(i_timeDiff);
}
}
+1 -1
View File
@@ -33,7 +33,7 @@ inline void
Trinity::ObjectUpdater::Visit(CreatureMapType &m)
{
for(CreatureMapType::iterator iter=m.begin(); iter != m.end(); ++iter)
if(!iter->getSource()->isSpiritService())
if(iter->getSource()->IsInWorld() && !iter->getSource()->isSpiritService())
iter->getSource()->Update(i_timeDiff);
}