mirror of
https://github.com/mangosfour/server.git
synced 2025-12-12 10:37:03 +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
|
|
@ -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;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue