aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authormegamage <none@none>2009-06-06 20:24:50 -0500
committermegamage <none@none>2009-06-06 20:24:50 -0500
commit37dabaf71efc2a001288703b55bca67d3f568419 (patch)
treeda8ce1f97736bfb98b37ee01bf14c6381f669f71 /src
parent9f9a9f82073e712d38d1dae3f083af25c0f7e7c6 (diff)
[7969] Remove gameobject from owner gameobjecs list at expire. Author: Ambal
This will prevent delayd owner access from gameobject destructor in time remove list proccessing and fix possible related problems with crosslinked pointers. --HG-- branch : trunk
Diffstat (limited to 'src')
-rw-r--r--src/game/GameObject.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/game/GameObject.cpp b/src/game/GameObject.cpp
index 239fe826087..106c41f720e 100644
--- a/src/game/GameObject.cpp
+++ b/src/game/GameObject.cpp
@@ -414,7 +414,10 @@ void GameObject::Update(uint32 /*p_time*/)
if(GetOwnerGUID())
{
- m_respawnTime = 0;
+ if(Unit* owner = GetOwner())
+ owner->RemoveGameObject(this, false);
+
+ SetRespawnTime(0);
Delete();
return;
}