diff --git a/source/core/gameinput.cpp b/source/core/gameinput.cpp index c9bc3bbb1..2ddb44958 100644 --- a/source/core/gameinput.cpp +++ b/source/core/gameinput.cpp @@ -210,6 +210,7 @@ void GameInput::processVehicle(PlayerAngles* const plrAngles, const float scaleA const auto kbdForwards = buttonMap.ButtonDown(gamefunc_Move_Forward) || buttonMap.ButtonDown(gamefunc_Strafe); const auto kbdBackward = buttonMap.ButtonDown(gamefunc_Move_Backward); thisInput.fvel = kbdForwards - kbdBackward + joyAxes[JOYAXIS_Forward]; + inputBuffer.fvel = clamp(inputBuffer.fvel + thisInput.fvel, -1.f, 1.f); // This sync bit is the brake key. if (buttonMap.ButtonDown(gamefunc_Run)) inputBuffer.actions |= SB_CROUCH; @@ -235,6 +236,7 @@ void GameInput::processVehicle(PlayerAngles* const plrAngles, const float scaleA thisInput.avel -= turnVel * joyAxes[JOYAXIS_Yaw]; thisInput.avel += turnVel * kbdDir; thisInput.avel *= scaleAdjust; + inputBuffer.avel = clamp(inputBuffer.avel + thisInput.avel, -turnVel * 1.5f, turnVel * 1.5f); if (kbdDir) updateTurnHeldAmt(scaleAdjust); else turnheldtime = 0; } else @@ -242,10 +244,6 @@ void GameInput::processVehicle(PlayerAngles* const plrAngles, const float scaleA turnheldtime = 0; } - // add collected input to game's local input accumulation packet. - inputBuffer.fvel = clamp(inputBuffer.fvel + thisInput.fvel, -1.00f, 1.00f); - inputBuffer.avel = clamp(inputBuffer.avel + thisInput.avel, -179.f, 179.f); - // directly update player angles if we can. if (scaleAdjust < 1) {