diff options
| author | Magnus Auvinen <magnus.auvinen@gmail.com> | 2007-12-09 15:58:24 +0000 |
|---|---|---|
| committer | Magnus Auvinen <magnus.auvinen@gmail.com> | 2007-12-09 15:58:24 +0000 |
| commit | 20e390ade2183e205bf92536302051344f19565f (patch) | |
| tree | 8627d72462930e238d8b88b4fd2ce4efa1a22b59 /src | |
| parent | b7cbe51313409ce1b31a1a931c5508385af4696c (diff) | |
| download | zcatch-20e390ade2183e205bf92536302051344f19565f.tar.gz zcatch-20e390ade2183e205bf92536302051344f19565f.zip | |
fixed so that the hook is released the the player is killed
Diffstat (limited to 'src')
| -rw-r--r-- | src/game/game.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/game/game.cpp b/src/game/game.cpp index 6e91f06c..f7b11e81 100644 --- a/src/game/game.cpp +++ b/src/game/game.cpp @@ -252,6 +252,13 @@ void player_core::tick() player_core *p = world->players[hooked_player]; if(p) hook_pos = p->pos; + else + { + // release hook + hooked_player = -1; + hook_state = HOOK_RETRACTED; + hook_pos = pos; + } // keep players hooked for a max of 1.5sec //if(server_tick() > hook_tick+(server_tickspeed()*3)/2) |