From 62b98abecdc0cc5cead8ac3d98aeeff7d3b8959a Mon Sep 17 00:00:00 2001 From: docentYT <63965954+docentYT@users.noreply.github.com> Date: Tue, 3 Feb 2026 00:41:31 +0100 Subject: [PATCH] ComputeAxisSpeed for m_moverate.y --- Camera.cpp | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/Camera.cpp b/Camera.cpp index 623a7d33..28f489e0 100644 --- a/Camera.cpp +++ b/Camera.cpp @@ -109,15 +109,7 @@ TCamera::OnCommand( command_data const &Command ) { 10.0 : 1.0 ); // up-down - auto const moveyparam { Command.param1 }; - // 2/3rd of the stick range lerps walk speed, past that we lerp between max walk and run speed - auto const movey { walkspeed * std::min(std::abs(moveyparam) * (1.0 / stickthreshold), 1.0) - + ( std::max( 0.0, std::abs( moveyparam ) - stickthreshold ) / (1.0 - stickthreshold) ) * std::max( 0.0, movespeed - walkspeed ) }; - - m_moverate.y = ( - moveyparam > 0.0 ? movey * speedmultiplier : - moveyparam < 0.0 ? -movey * speedmultiplier : - 0.0 ); + m_moverate.y = ComputeAxisSpeed(Command.param1, walkspeed, movespeed, stickthreshold) * speedmultiplier; break; }