From 25ca23f2e2996ce3269398be485f2767c54370ba Mon Sep 17 00:00:00 2001 From: Mitchell Richters Date: Fri, 24 Jul 2020 18:32:01 +1000 Subject: [PATCH] - fix keyboard input fvel/svel more in line with Graf's coding style. * Essentially reverts e41041074d8f3c238292798f95c728411e4aee09 and moves the use of `abs()` from keymove to fvel/svel itself. --- 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 576893cd4..bcee8f4cd 100644 --- a/source/games/duke/src/input.cpp +++ b/source/games/duke/src/input.cpp @@ -883,7 +883,7 @@ static void processMovement(player_struct *p, input_t &input, ControlInfo &info, } - if (loc.svel < keymove && loc.svel > -keymove) + if (abs(loc.svel) < keymove) { if (buttonMap.ButtonDown(gamefunc_Strafe_Left)) input.svel += keymove; @@ -892,7 +892,7 @@ static void processMovement(player_struct *p, input_t &input, ControlInfo &info, input.svel += -keymove; } - if (loc.fvel < keymove && loc.fvel > -keymove) + if (abs(loc.fvel) < keymove) { if (isRR() && p->drink_amt >= 66 && p->drink_amt <= 87) {