From d1d40c6982fd1e661b5d995e0d369eb1a6f652cd Mon Sep 17 00:00:00 2001 From: Mitchell Richters Date: Mon, 7 Sep 2020 08:07:53 +1000 Subject: [PATCH] - SW: Move SW's input scaler into `processMovement()`. Doesn't need to be available to any other function. --- source/sw/src/input.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/source/sw/src/input.cpp b/source/sw/src/input.cpp index eb175a5a6..a51a36f5f 100644 --- a/source/sw/src/input.cpp +++ b/source/sw/src/input.cpp @@ -40,9 +40,6 @@ void DoPlayerHorizon(PLAYERp pp, fixed_t *pq16horiz, fixed_t q16horz, double con static InputPacket loc; static int32_t turnheldtime; -// Constant used for scaling input down to match other games. May not last long after true re-factoring. -static constexpr double const inputScale = 263. / 360.; - void InitNetVars(void) { @@ -208,6 +205,9 @@ static void processMovement(PLAYERp const pp, ControlInfo* const hidInput, bool int32_t fvel = 0, svel = 0; fixed_t q16avel = 0, q16horz = 0; + // Constant used for scaling input down to match other games. May not last long after true re-factoring. + constexpr double inputScale = 263. / 360.; + if (loc.actions & SB_RUN) { turnamount = pp->sop_control ? RUNTURN * 3 : RUNTURN;