mirror of
https://github.com/mangosfour/server.git
synced 2025-12-12 10:37:03 +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
|
|
@ -106,7 +106,7 @@ Unit* DynamicObject::GetCaster() const
|
|||
return ObjectAccessor::GetUnit(*this, GetCasterGUID());
|
||||
}
|
||||
|
||||
void DynamicObject::Update(uint32 update_diff, uint32 /*tick_diff*/)
|
||||
void DynamicObject::Update(uint32 p_time)
|
||||
{
|
||||
// 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 update_diff, uint32 /*tick_diff*/)
|
|||
|
||||
bool deleteThis = false;
|
||||
|
||||
if(m_aliveDuration > int32(update_diff))
|
||||
m_aliveDuration -= update_diff;
|
||||
if(m_aliveDuration > int32(p_time))
|
||||
m_aliveDuration -= p_time;
|
||||
else
|
||||
deleteThis = true;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue