about summary refs log tree commit diff
path: root/src/game/gamecore.cpp
diff options
context:
space:
mode:
authorMagnus Auvinen <magnus.auvinen@gmail.com>2008-10-17 21:42:32 +0000
committerMagnus Auvinen <magnus.auvinen@gmail.com>2008-10-17 21:42:32 +0000
commit714e49b8cf5679faef0abe945014d6d260ceb643 (patch)
tree62527e108c3f4f3040ed3e14dde06f8e08ffa0aa /src/game/gamecore.cpp
parenta91fecae920e1b6d9ca3dbdbf6251c11bd751d7c (diff)
downloadzcatch-714e49b8cf5679faef0abe945014d6d260ceb643.tar.gz
zcatch-714e49b8cf5679faef0abe945014d6d260ceb643.zip
made sure that the hook is released on players that doesn't exist anymore aka dead.
Diffstat (limited to 'src/game/gamecore.cpp')
-rw-r--r--src/game/gamecore.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/game/gamecore.cpp b/src/game/gamecore.cpp
index c4a3392b..ccef8de8 100644
--- a/src/game/gamecore.cpp
+++ b/src/game/gamecore.cpp
@@ -395,7 +395,7 @@ void CHARACTER_CORE::tick(bool use_input)
 
 		// release hook		
 		hook_tick++;
-		if(hooked_player != -1 && hook_tick > SERVER_TICK_SPEED*2)
+		if(hooked_player != -1 && (hook_tick > SERVER_TICK_SPEED*2 || !world->characters[hooked_player]))
 		{
 			hooked_player = -1;
 			hook_state = HOOK_RETRACTED;