diff options
| author | Magnus Auvinen <magnus.auvinen@gmail.com> | 2008-03-22 13:03:52 +0000 |
|---|---|---|
| committer | Magnus Auvinen <magnus.auvinen@gmail.com> | 2008-03-22 13:03:52 +0000 |
| commit | 0761a483a2247dca816b2c355588360515c088ae (patch) | |
| tree | 09aaad9b87711cfdd4f7dfe3a478a43d1249610b /src/game/g_game.cpp | |
| parent | fc814009553cac9180a9009cd1bf206d809d6e73 (diff) | |
| download | zcatch-0761a483a2247dca816b2c355588360515c088ae.tar.gz zcatch-0761a483a2247dca816b2c355588360515c088ae.zip | |
made the hook length more apparent
Diffstat (limited to 'src/game/g_game.cpp')
| -rw-r--r-- | src/game/g_game.cpp | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/game/g_game.cpp b/src/game/g_game.cpp index 800c41ba..747b832a 100644 --- a/src/game/g_game.cpp +++ b/src/game/g_game.cpp @@ -246,8 +246,13 @@ void player_core::tick() hook_tick = 0; triggered_events |= COREEVENT_HOOK_LAUNCH; } - else if(hook_state == HOOK_GOING_TO_RETRACT) + else if(hook_state >= HOOK_RETRACT_START && hook_state < HOOK_RETRACT_END) { + hook_state++; + } + else if(hook_state == HOOK_RETRACT_END) + { + hook_state = HOOK_RETRACTED; triggered_events |= COREEVENT_HOOK_RETRACT; hook_state = HOOK_RETRACTED; } @@ -256,7 +261,7 @@ void player_core::tick() vec2 new_pos = hook_pos+hook_dir*world->tuning.hook_fire_speed; if(distance(pos, new_pos) > world->tuning.hook_length) { - hook_state = HOOK_GOING_TO_RETRACT; + hook_state = HOOK_RETRACT_START; new_pos = pos + normalize(new_pos-pos) * world->tuning.hook_length; } |