From f2c6a23f386eb5d63a23a94e1af77a6aff980fe6 Mon Sep 17 00:00:00 2001 From: Mitchell Richters Date: Wed, 30 Dec 2020 18:04:30 +1100 Subject: [PATCH] - Duke: Allow horz input to go through when returning to center and horiz is abs(5) or less. This mimics the original behaviour where Duke would stop returning to center at 95/105. This allows faster mouse input to be applied instead of waiting for player's horizon to return to 0. --- source/games/duke/src/input.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/games/duke/src/input.cpp b/source/games/duke/src/input.cpp index 54bf48276..bbec33627 100644 --- a/source/games/duke/src/input.cpp +++ b/source/games/duke/src/input.cpp @@ -825,7 +825,7 @@ static void FinalizeInput(int playerNum, InputPacket& input, bool vehicle) loc.avel = input.avel = 0; } - if (p->newOwner == nullptr && !(p->sync.actions & SB_CENTERVIEW)) + if (p->newOwner == nullptr && (!(p->sync.actions & SB_CENTERVIEW) || p->sync.actions & SB_CENTERVIEW && abs(p->horizon.horiz.asbuild()) <= 5)) { // input.horz already added to loc in processMovement() loc.horz = clamp(loc.horz, -MAXHORIZVEL, MAXHORIZVEL);