[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

@ -106,7 +106,7 @@ Unit* DynamicObject::GetCaster() const
return ObjectAccessor::GetUnit(*this, GetCasterGUID());
}
void DynamicObject::Update(uint32 p_time)
void DynamicObject::Update(uint32 update_diff, uint32 /*tick_diff*/)
{
// caster can be not in world at time dynamic object update, but dynamic object not yet deleted in Unit destructor
Unit* caster = GetCaster();
@ -118,8 +118,8 @@ void DynamicObject::Update(uint32 p_time)
bool deleteThis = false;
if(m_aliveDuration > int32(p_time))
m_aliveDuration -= p_time;
if(m_aliveDuration > int32(update_diff))
m_aliveDuration -= update_diff;
else
deleteThis = true;