aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authormegamage <none@none>2009-06-06 19:59:04 -0500
committermegamage <none@none>2009-06-06 19:59:04 -0500
commit72ac0a2452ec5fcce70e611b9bf2b24fdd4d3b5a (patch)
tree4fb019c9a845009bf479e4f5fce214930a4339e9 /src
parentdb0f2d69b885d401026b732cd294f9d1e5ed2b7f (diff)
*Fix incorrect check of trap charges.
--HG-- branch : trunk
Diffstat (limited to 'src')
-rw-r--r--src/game/GameObject.cpp4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/game/GameObject.cpp b/src/game/GameObject.cpp
index c8021c8bb8b..239fe826087 100644
--- a/src/game/GameObject.cpp
+++ b/src/game/GameObject.cpp
@@ -324,8 +324,6 @@ void GameObject::Update(uint32 /*p_time*/)
return;
}
- bool NeedDespawn = (goInfo->trap.charges != 0);
-
// Note: this hack with search required until GO casting not implemented
// search unfriendly creature
if(owner) // hunter trap
@@ -359,7 +357,7 @@ void GameObject::Update(uint32 /*p_time*/)
else
m_cooldownTime = time(NULL) + 4; // 4 seconds
- if(NeedDespawn)
+ if(owner)
SetLootState(GO_JUST_DEACTIVATED); // can be despawned or destroyed
if(IsBattleGroundTrap && ok->GetTypeId() == TYPEID_PLAYER)