From c41a78f1ef7e9149d6a3018e9c04550b81241d46 Mon Sep 17 00:00:00 2001 From: UniversePM Date: Wed, 26 Aug 2026 19:27:10 -0500 Subject: [PATCH] fix: replace jump-based if statement with declaration & use turnX/turnY --- Minecraft.Client/Input.cpp | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/Minecraft.Client/Input.cpp b/Minecraft.Client/Input.cpp index d4f4999c..ddff870e 100644 --- a/Minecraft.Client/Input.cpp +++ b/Minecraft.Client/Input.cpp @@ -7,9 +7,6 @@ #include "Input.h" #include "..\Minecraft.Client\LocalPlayer.h" #include "Options.h" -#ifdef _WINDOWS64 -#include "Windows64/KBMInput.h" -#endif Input::Input() { @@ -150,6 +147,8 @@ void Input::tick(LocalPlayer *player) tx = ty = 0.0f; } + float turnX = tx * abs(tx) * turnSpeed; + float turnY = ty * abs(ty) * turnSpeed; #ifdef _WINDOWS64 if (iPad == 0 && g_KBMInput.IsMouseGrabbed() && g_KBMInput.IsKBMActive()) { @@ -168,7 +167,7 @@ void Input::tick(LocalPlayer *player) } #endif - player->interpolateTurn(tx * abs(tx) * turnSpeed, ty * abs(ty) * turnSpeed); + player->interpolateTurn(turnX, turnY); //jumping = controller.isButtonPressed(0); @@ -178,7 +177,7 @@ void Input::tick(LocalPlayer *player) #ifdef _WINDOWS64 kbJump = (iPad == 0) && g_KBMInput.IsMouseGrabbed() && g_KBMInput.IsKBMActive() && g_KBMInput.IsKeyDown(KeyboardMouseInput::KEY_JUMP); #endif - if( (jump > 0 || kbJump) && pMinecraft->localgameModes[iPad]->isInputAllowed(MINECRAFT_ACTION_JUMP) ) + jumping = (jump > 0 || kbJump) && pMinecraft->localgameModes[iPad]->isInputAllowed(MINECRAFT_ACTION_JUMP) #ifndef _CONTENT_PACKAGE if (app.GetFreezePlayers()) jumping = false;