- ensure keyboard fvel/svel input never exceeds the range of keymove.

Repairs issue where keyboard input was accelerating to a value of 90 which was not possible in the original game.
This commit is contained in:
Mitchell Richters 2020-07-22 20:42:05 +10:00
parent 368298d02d
commit e41041074d

View file

@ -907,7 +907,7 @@ static void processMovement(player_struct *p, input_t &input, ControlInfo &info,
} }
if (loc.svel < abs(keymove)) if (loc.svel < keymove && loc.svel > -keymove)
{ {
if (buttonMap.ButtonDown(gamefunc_Strafe_Left)) if (buttonMap.ButtonDown(gamefunc_Strafe_Left))
input.svel += keymove; input.svel += keymove;
@ -916,7 +916,7 @@ static void processMovement(player_struct *p, input_t &input, ControlInfo &info,
input.svel += -keymove; input.svel += -keymove;
} }
if (loc.fvel < abs(keymove)) if (loc.fvel < keymove && loc.fvel > -keymove)
{ {
if (isRR() && p->drink_amt >= 66 && p->drink_amt <= 87) if (isRR() && p->drink_amt >= 66 && p->drink_amt <= 87)
{ {