aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authormegamage <none@none>2009-05-03 10:34:02 -0500
committermegamage <none@none>2009-05-03 10:34:02 -0500
commit558a5707ff50edf93375ae6e50335422c9ec13e4 (patch)
tree9a62f957f9ac6076fee07e5143aa3529591add80 /src
parentbb4499887cf9592905fd3cec55c3ab8799960013 (diff)
*Only update object which are in world.
--HG-- branch : trunk
Diffstat (limited to 'src')
-rw-r--r--src/game/Creature.cpp2
-rw-r--r--src/game/GridNotifiers.cpp3
-rw-r--r--src/game/GridNotifiersImpl.h2
3 files changed, 4 insertions, 3 deletions
diff --git a/src/game/Creature.cpp b/src/game/Creature.cpp
index a1907c9525d..5d18140f200 100644
--- a/src/game/Creature.cpp
+++ b/src/game/Creature.cpp
@@ -1724,7 +1724,7 @@ void Creature::Respawn()
//Call AI respawn virtual function
AI()->JustRespawned();
- GetMap()->Add(this);
+ //GetMap()->Add(this);
}
}
diff --git a/src/game/GridNotifiers.cpp b/src/game/GridNotifiers.cpp
index e27abeccd0c..fe1a072cf20 100644
--- a/src/game/GridNotifiers.cpp
+++ b/src/game/GridNotifiers.cpp
@@ -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);
}
}
diff --git a/src/game/GridNotifiersImpl.h b/src/game/GridNotifiersImpl.h
index 3b9a7b79204..70f77b95ae8 100644
--- a/src/game/GridNotifiersImpl.h
+++ b/src/game/GridNotifiersImpl.h
@@ -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);
}