From d4dd737cd54e5c30c41a339fba6cefad696f3a42 Mon Sep 17 00:00:00 2001 From: Mitchell Richters Date: Mon, 30 Mar 2020 12:10:59 +1100 Subject: [PATCH] SW: Amend scaleAdjustmentToInterval() with correct value for SW. --- source/sw/src/game.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/sw/src/game.cpp b/source/sw/src/game.cpp index 460e0b7e5..1717553b8 100644 --- a/source/sw/src/game.cpp +++ b/source/sw/src/game.cpp @@ -3135,7 +3135,7 @@ void getinput(int const playerNum) lastInputTicks = currentHiTicks; - auto scaleAdjustmentToInterval = [=](double x) { return x * 30 / (1000.0 / elapsedInputTicks); }; + auto scaleAdjustmentToInterval = [=](double x) { return x * (120 / synctics) / (1000.0 / elapsedInputTicks); }; if (buttonMap.ButtonDown(gamefunc_Strafe) && !pp->sop) { @@ -3186,7 +3186,7 @@ void getinput(int const playerNum) localInput.vel = clamp(localInput.vel + input.vel, -MAXVEL, MAXVEL); localInput.svel = clamp(localInput.svel + input.svel, -MAXSVEL, MAXSVEL); - localInput.q16avel = fix16_sadd(localInput.q16avel, input.q16avel); + localInput.q16avel = fix16_clamp(fix16_sadd(localInput.q16avel, input.q16avel), fix16_from_int(-MAXANGVEL), fix16_from_int(MAXANGVEL)); pp->q16ang = fix16_sadd(pp->q16ang, input.q16avel) & 0x7FFFFFF; localInput.q16horz = fix16_clamp(fix16_sadd(localInput.q16horz, input.q16horz), fix16_from_int(-MAXHORIZVEL), fix16_from_int(MAXHORIZVEL));