mirror of
https://github.com/mangosfour/server.git
synced 2025-12-16 04:37:00 +00:00
[10688] New version of patch for send real diff from last update.
In new version last update time stopred for specific Cell that store all world objects placed in it. All objects of Cell updated (or not updated) in same time. Original version provided by ciphercom.
This commit is contained in:
parent
464908f453
commit
e219ee99bb
36 changed files with 183 additions and 151 deletions
|
|
@ -227,6 +227,8 @@ ObjectGridLoader::Load(GridType &grid)
|
|||
|
||||
void ObjectGridLoader::LoadN(void)
|
||||
{
|
||||
uint32 updatetime = i_map->GetLastUpdateTime();
|
||||
|
||||
i_gameObjects = 0; i_creatures = 0; i_corpses = 0;
|
||||
i_cell.data.Part.cell_y = 0;
|
||||
for(unsigned int x=0; x < MAX_NUMBER_OF_CELLS; ++x)
|
||||
|
|
@ -237,6 +239,9 @@ void ObjectGridLoader::LoadN(void)
|
|||
i_cell.data.Part.cell_y = y;
|
||||
GridLoader<Player, AllWorldObjectTypes, AllGridObjectTypes> loader;
|
||||
loader.Load(i_grid(x, y), *this);
|
||||
|
||||
// setup last update time for loaded cell
|
||||
i_grid(x, y).SetLastUpdateTimeAndReturnDiff(updatetime);
|
||||
}
|
||||
}
|
||||
DEBUG_LOG("%u GameObjects, %u Creatures, and %u Corpses/Bones loaded for grid %u on map %u", i_gameObjects, i_creatures, i_corpses,i_grid.GetGridId(), i_map->GetId());
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue