From e41041074d8f3c238292798f95c728411e4aee09 Mon Sep 17 00:00:00 2001 From: Mitchell Richters Date: Wed, 22 Jul 2020 20:42:05 +1000 Subject: [PATCH] - 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. --- source/games/duke/src/input.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/games/duke/src/input.cpp b/source/games/duke/src/input.cpp index 953660137..5bcca590c 100644 --- a/source/games/duke/src/input.cpp +++ b/source/games/duke/src/input.cpp @@ -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)) input.svel += keymove; @@ -916,7 +916,7 @@ static void processMovement(player_struct *p, input_t &input, ControlInfo &info, 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) {