[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:
VladimirMangos 2010-11-06 19:43:23 +03:00
parent 464908f453
commit e219ee99bb
36 changed files with 183 additions and 151 deletions

View file

@ -117,12 +117,20 @@ class MANGOS_DLL_DECL Grid
return i_container.template remove<SPECIFIC_OBJECT>(obj);
}
uint32 SetLastUpdateTimeAndReturnDiff(uint32 newtime)
{
uint32 realdiff = getMSTimeDiff(m_LastUpdateTime,newtime);
m_LastUpdateTime = newtime;
return realdiff;
}
private:
TypeMapContainer<GRID_OBJECT_TYPES> i_container;
TypeMapContainer<WORLD_OBJECT_TYPES> i_objects;
typedef std::set<void*> ActiveGridObjects;
ActiveGridObjects m_activeGridObjects;
uint32 m_LastUpdateTime; // last time when Update call has been or current started, used and set Map::Update
};
#endif