From 714e49b8cf5679faef0abe945014d6d260ceb643 Mon Sep 17 00:00:00 2001 From: Magnus Auvinen Date: Fri, 17 Oct 2008 21:42:32 +0000 Subject: made sure that the hook is released on players that doesn't exist anymore aka dead. --- src/game/gamecore.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/game/gamecore.cpp') 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; -- cgit 1.4.1