mirror of
https://github.com/mangosfour/server.git
synced 2026-01-01 07:37:07 +00:00
[10683] Revert "[10677] Send to creature/etc Update call real diff from last update and use it."
This reverts commit 10784a8c7cc81c468b5411e973d36ecf31de9603. Main reason: impossibility for me as commiter test problem and fix all corner cases problems.
This commit is contained in:
parent
2f144d9d29
commit
0847d4c8cd
35 changed files with 149 additions and 162 deletions
|
|
@ -61,14 +61,13 @@ namespace MaNGOS
|
|||
struct MANGOS_DLL_DECL GridUpdater
|
||||
{
|
||||
GridType &i_grid;
|
||||
uint32 i_time;
|
||||
uint32 i_timeDiff;
|
||||
GridUpdater(GridType &grid, uint32 time_, uint32 diff) : i_grid(grid), i_time(time_), i_timeDiff(diff) {}
|
||||
GridUpdater(GridType &grid, uint32 diff) : i_grid(grid), i_timeDiff(diff) {}
|
||||
|
||||
template<class T> void updateObjects(GridRefManager<T> &m)
|
||||
{
|
||||
for(typename GridRefManager<T>::iterator iter = m.begin(); iter != m.end(); ++iter)
|
||||
iter->getSource()->UpdateCall(i_time, i_timeDiff);
|
||||
iter->getSource()->Update(i_timeDiff);
|
||||
}
|
||||
|
||||
void Visit(PlayerMapType &m) { updateObjects<Player>(m); }
|
||||
|
|
@ -137,9 +136,8 @@ namespace MaNGOS
|
|||
|
||||
struct MANGOS_DLL_DECL ObjectUpdater
|
||||
{
|
||||
uint32 i_time; // current tick time in msecs
|
||||
uint32 i_diff; // current tick time diff in msecs
|
||||
explicit ObjectUpdater(uint32 time_, uint32 diff) : i_time(time_), i_diff(diff) {}
|
||||
uint32 i_timeDiff;
|
||||
explicit ObjectUpdater(const uint32 &diff) : i_timeDiff(diff) {}
|
||||
template<class T> void Visit(GridRefManager<T> &m);
|
||||
void Visit(PlayerMapType &) {}
|
||||
void Visit(CorpseMapType &) {}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue