aboutsummaryrefslogtreecommitdiff
path: root/src/game/Map.cpp
diff options
context:
space:
mode:
authormegamage <none@none>2009-06-17 18:37:53 -0500
committermegamage <none@none>2009-06-17 18:37:53 -0500
commitfe7c616b2d079f9b1edb15f9795eaf3b5c55b9a8 (patch)
tree347ca16142a779026c77e14bebdc22bebc53b630 /src/game/Map.cpp
parenta2f10c496fcacbfd3dcb976807c8c23012aba03d (diff)
[8031] Move player update code to Map::Update. Author: Ambal
--HG-- branch : trunk
Diffstat (limited to 'src/game/Map.cpp')
-rw-r--r--src/game/Map.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/game/Map.cpp b/src/game/Map.cpp
index 344fcbc74a2..6dbb0e37c86 100644
--- a/src/game/Map.cpp
+++ b/src/game/Map.cpp
@@ -649,6 +649,15 @@ void Map::RemoveUnitFromNotify(int32 slot)
void Map::Update(const uint32 &t_diff)
{
+ /// update players at tick
+ for(m_mapRefIter = m_mapRefManager.begin(); m_mapRefIter != m_mapRefManager.end(); ++m_mapRefIter)
+ {
+ Player* plr = m_mapRefIter->getSource();
+ if(plr && plr->IsInWorld())
+ plr->Update(t_diff);
+ }
+
+ /// update active cells around players and active objects
resetMarkedCells();
Trinity::ObjectUpdater updater(t_diff);