diff options
author | Mikko Tiusanen <ams@daug.net> | 2014-09-02 23:22:24 +0300 |
---|---|---|
committer | Mikko Tiusanen <ams@daug.net> | 2014-09-02 23:22:24 +0300 |
commit | c9cd49156309f29a8576ac17788dfd6ead583cc4 (patch) | |
tree | a525706c9222214e3cf36eac63ba689ad80ddf65 /src/game/bg_pmove.c | |
parent | fd0c5a395999655866303cd54ce6e6d65b00c0a7 (diff) |
Hummel can now stop mid-air by using the walk key.
Diffstat (limited to 'src/game/bg_pmove.c')
-rw-r--r-- | src/game/bg_pmove.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/game/bg_pmove.c b/src/game/bg_pmove.c index cb215a3..c78129b 100644 --- a/src/game/bg_pmove.c +++ b/src/game/bg_pmove.c @@ -51,6 +51,7 @@ float pm_friction = 6.0f; float pm_waterfriction = 1.0f; float pm_flightfriction = 6.0f; float pm_hummelfriction = 2.5f; +float pm_hummelwalkfriction = 8.0f; float pm_spectatorfriction = 5.0f; int c_pmove = 0; @@ -262,7 +263,7 @@ static void PM_Friction( void ) vec3_t vec; float *vel; float speed, newspeed, control; - float drop; + float drop, modifier; vel = pm->ps->velocity; @@ -323,7 +324,10 @@ static void PM_Friction( void ) } */ if( pm->ps->pm_type == PM_HUMMEL /*&& pm->ps->torsoTimer <= 0*/ ) - drop += speed * pm_hummelfriction * pml.frametime; + { + modifier = ( pm->cmd.buttons & BUTTON_WALKING ) ? pm_hummelwalkfriction : pm_hummelfriction; + drop += speed * modifier * pml.frametime; + } // scale the velocity newspeed = speed - drop; @@ -337,7 +341,6 @@ static void PM_Friction( void ) vel[ 2 ] = vel[ 2 ] * newspeed; } - /* ============== PM_Accelerate |