From 5d544bcb837531bb31dd517a0ff3a4a55a646f8e Mon Sep 17 00:00:00 2001 From: qwasdrizzel <145519042+qwasdrizzel@users.noreply.github.com> Date: Thu, 5 Mar 2026 18:22:54 -0600 Subject: [PATCH] Fix for flying angle snapping (#641) * Modify dispense behavior to set outcome as LEFT_ITEM * Fix the angle problem with flying Removed checks that limit flying to a 90 degree angle, which caused the problem. --- Minecraft.Client/LocalPlayer.cpp | 35 ++------------------------------ 1 file changed, 2 insertions(+), 33 deletions(-) diff --git a/Minecraft.Client/LocalPlayer.cpp b/Minecraft.Client/LocalPlayer.cpp index 77306621..cfcf85ac 100644 --- a/Minecraft.Client/LocalPlayer.cpp +++ b/Minecraft.Client/LocalPlayer.cpp @@ -143,39 +143,8 @@ void LocalPlayer::serverAiStep() { Player::serverAiStep(); - if( abilities.flying && abilities.mayfly ) - { - // snap y rotation for flying to nearest 90 degrees in world space - float fMag = sqrtf(input->xa * input->xa + input->ya * input->ya); - // Don't bother for tiny inputs - if( fMag >= 0.1f ) - { - // Get angle (in player rotated space) of input controls - float yRotInput = atan2f(input->ya, input->xa) * (180.0f / PI); - // Now get in world space - float yRotFinal = yRotInput + yRot; - // Snap this to nearest 90 degrees - float yRotSnapped = floorf((yRotFinal / 45.0f) + 0.5f) * 45.0f; - // Find out how much we had to move to do this snap - float yRotDiff = yRotSnapped - yRotFinal; - // Apply the same difference to the player rotated space angle - float yRotInputAdjust = yRotInput + yRotDiff; - - // Calculate final x/y player-space movement required - this->xxa = cos(yRotInputAdjust * ( PI / 180.0f) ) * fMag; - this->yya = sin(yRotInputAdjust * ( PI / 180.0f) ) * fMag; - } - else - { - this->xxa = input->xa; - this->yya = input->ya; - } - } - else - { - this->xxa = input->xa; - this->yya = input->ya; - } + this->xxa = input->xa; + this->yya = input->ya; this->jumping = input->jumping; yBobO = yBob;