*Only update object which are in world.
--HG-- branch : trunk
This commit is contained in:
@@ -1724,7 +1724,7 @@ void Creature::Respawn()
|
||||
//Call AI respawn virtual function
|
||||
AI()->JustRespawned();
|
||||
|
||||
GetMap()->Add(this);
|
||||
//GetMap()->Add(this);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user