*Do unit relocation notification only once per update. Hope this can solve the stealth crash problem once for all.

--HG--
branch : trunk
This commit is contained in:
megamage
2008-11-29 13:08:23 -06:00
parent f2814351af
commit 3d8d45c57a
5 changed files with 59 additions and 9 deletions
+3 -3
View File
@@ -101,7 +101,7 @@ Trinity::PlayerRelocationNotifier::Visit(CreatureMapType &m)
return;
for(CreatureMapType::iterator iter=m.begin(); iter != m.end(); ++iter)
if( iter->getSource()->isAlive())
if( !iter->getSource()->m_Notified && iter->getSource()->isAlive())
PlayerCreatureRelocationWorker(&i_player,iter->getSource());
}
@@ -113,7 +113,7 @@ Trinity::CreatureRelocationNotifier::Visit(PlayerMapType &m)
return;
for(PlayerMapType::iterator iter=m.begin(); iter != m.end(); ++iter)
if( iter->getSource()->isAlive() && !iter->getSource()->isInFlight())
if( !iter->getSource()->m_Notified && iter->getSource()->isAlive() && !iter->getSource()->isInFlight())
PlayerCreatureRelocationWorker(iter->getSource(), &i_creature);
}
@@ -127,7 +127,7 @@ Trinity::CreatureRelocationNotifier::Visit(CreatureMapType &m)
for(CreatureMapType::iterator iter=m.begin(); iter != m.end(); ++iter)
{
Creature* c = iter->getSource();
if( c != &i_creature && c->isAlive())
if( !iter->getSource()->m_Notified && c != &i_creature && c->isAlive())
CreatureCreatureRelocationWorker(c, &i_creature);
}
}