mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-18 16:38:42 +01:00
[svn] Fixed freeze caused by dynamic objects (hopefully).
--HG-- branch : trunk
This commit is contained in:
@@ -137,8 +137,12 @@ void DynamicObject::Update(uint32 p_time)
|
||||
void DynamicObject::Delete()
|
||||
{
|
||||
// Make sure the object is back to grid container for removal as farsight targets
|
||||
// are switched to world container on creation
|
||||
GetMap()->SwitchGridContainers(this, false);
|
||||
// are switched to world container on creation and they are also set to active
|
||||
if (isActive())
|
||||
{
|
||||
GetMap()->SwitchGridContainers(this, false);
|
||||
setActive(false);
|
||||
}
|
||||
SendObjectDeSpawnAnim(GetGUID());
|
||||
AddObjectToRemoveList();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user