about summary refs log tree commit diff
diff options
context:
space:
mode:
authorMagnus Auvinen <magnus.auvinen@gmail.com>2007-12-10 19:49:36 +0000
committerMagnus Auvinen <magnus.auvinen@gmail.com>2007-12-10 19:49:36 +0000
commite35d3831416331f5a57a2d6a45870c1c44d47236 (patch)
tree195d0def8a6795e51882ea2b9d650cac440a17db
parentccff9ddc9e948e3f1494baee74aacc0e8db67146 (diff)
downloadzcatch-e35d3831416331f5a57a2d6a45870c1c44d47236.tar.gz
zcatch-e35d3831416331f5a57a2d6a45870c1c44d47236.zip
only release hook if hooked on a player
-rw-r--r--src/game/game.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/game/game.cpp b/src/game/game.cpp
index f7b11e81..79ef8e1a 100644
--- a/src/game/game.cpp
+++ b/src/game/game.cpp
@@ -291,7 +291,7 @@ void player_core::tick()
 
 		// release hook		
 		hook_tick++;
-		if(hook_tick > SERVER_TICK_SPEED*2)
+		if(hooked_player != -1 && hook_tick > SERVER_TICK_SPEED*2)
 		{
 			hooked_player = -1;
 			hook_state = HOOK_RETRACTED;