From 95fc2ac6f16a46adbb0c657b8a38e30758bc351d Mon Sep 17 00:00:00 2001 From: Mitchell Richters Date: Tue, 3 Oct 2023 18:50:13 +1100 Subject: [PATCH] - Make the last commit compile. --- source/core/gameinput.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/source/core/gameinput.cpp b/source/core/gameinput.cpp index 112051aba..a68b22d13 100644 --- a/source/core/gameinput.cpp +++ b/source/core/gameinput.cpp @@ -168,7 +168,9 @@ void GameInput::processMovement(PlayerAngles* const plrAngles, const float scale // add collected input to game's local input accumulation packet. const DVector3 maxVel{ (double)keymove, (double)keymove, 1. }; - inputBuffer.vel = clamp(inputBuffer.vel + thisInput.vel, -maxVel, maxVel); + inputBuffer.vel.X = clamp(inputBuffer.vel.X + thisInput.vel.X, -(double)keymove, (double)keymove); + inputBuffer.vel.Y = clamp(inputBuffer.vel.Y + thisInput.vel.Y, -(double)keymove, (double)keymove); + inputBuffer.vel.Z = clamp(inputBuffer.vel.Z + thisInput.vel.Z, -1., 1.); inputBuffer.avel = clamp(inputBuffer.avel + thisInput.avel, -179.f, 179.f); inputBuffer.horz = clamp(inputBuffer.horz + thisInput.horz, -179.f, 179.f);