diff --git a/Source/Game/Entities/Item/Item.cs b/Source/Game/Entities/Item/Item.cs index b17825c45..9f668e608 100644 --- a/Source/Game/Entities/Item/Item.cs +++ b/Source/Game/Entities/Item/Item.cs @@ -1317,11 +1317,16 @@ namespace Game.Entities base.ClearUpdateMask(remove); } - public override void AddToObjectUpdate() + public override bool AddToObjectUpdate() { Player owner = GetOwner(); if (owner) + { owner.GetMap().AddUpdateObject(this); + return true; + } + + return false; } public override void RemoveFromObjectUpdate() diff --git a/Source/Game/Entities/Object/WorldObject.cs b/Source/Game/Entities/Object/WorldObject.cs index 5d1696faa..615f498e6 100644 --- a/Source/Game/Entities/Object/WorldObject.cs +++ b/Source/Game/Entities/Object/WorldObject.cs @@ -724,10 +724,7 @@ namespace Game.Entities public void AddToObjectUpdateIfNeeded() { if (IsInWorld && !m_objectUpdated) - { - AddToObjectUpdate(); - m_objectUpdated = true; - } + m_objectUpdated = AddToObjectUpdate(); } public virtual void ClearUpdateMask(bool remove) @@ -2778,9 +2775,10 @@ namespace Game.Entities ClearUpdateMask(false); } - public virtual void AddToObjectUpdate() + public virtual bool AddToObjectUpdate() { GetMap().AddUpdateObject(this); + return true; } public virtual void RemoveFromObjectUpdate()