only release hook if hooked on a player

This commit is contained in:
Magnus Auvinen 2007-12-10 19:49:36 +00:00
parent ccff9ddc9e
commit e35d383141

View file

@ -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;