aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/game/DynamicObject.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/game/DynamicObject.cpp b/src/game/DynamicObject.cpp
index 5a5ba008606..b61b6654167 100644
--- a/src/game/DynamicObject.cpp
+++ b/src/game/DynamicObject.cpp
@@ -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();
}