mirror of
https://github.com/mangosfour/server.git
synced 2025-12-14 16:37:01 +00:00
[8031] Move player update code to Map::Update.
Signed-off-by: VladimirMangos <vladimir@getmangos.com>
This commit is contained in:
parent
7024862b82
commit
2b69a914cf
5 changed files with 10 additions and 13 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue