aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorgvcoman <none@none>2008-11-15 13:34:59 -0600
committergvcoman <none@none>2008-11-15 13:34:59 -0600
commit61d9723c5bfae4c528a4d0963ec1cc90f78ca71d (patch)
tree20a9afc3480a25a300340a9676050b47e12c9cf2
parent8df6868fac60722f4b5c5278492a1e6bad19b10e (diff)
[svn] Fixed freeze caused by dynamic objects (hopefully).
--HG-- branch : trunk
-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();
}