[8031] Move player update code to Map::Update.

Signed-off-by: VladimirMangos <vladimir@getmangos.com>
This commit is contained in:
Ambal 2009-06-17 01:55:44 +04:00 committed by VladimirMangos
parent 7024862b82
commit 2b69a914cf
5 changed files with 10 additions and 13 deletions

View file

@ -550,6 +550,15 @@ bool Map::loaded(const GridPair &p) const
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();
MaNGOS::ObjectUpdater updater(t_diff);