From c91e0bb91688e56afe2160ee8b6095a5d8ff6d56 Mon Sep 17 00:00:00 2001 From: Kelsi Date: Tue, 10 Feb 2026 20:46:46 -0800 Subject: [PATCH] Immediately cancel mount fidgets when movement starts Fidget animations were continuing to play for a frame when movement started. Now forces immediate switch to run animation. Changes: - Check for movement + active fidget at start of animation logic - Force play run animation immediately to stop fidget - Only check fidget completion when not moving (optimization) - Removed duplicate mountActiveFidget_ = 0 in movement branch Fidgets now stop instantly when player starts moving on mount. --- src/rendering/renderer.cpp | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/src/rendering/renderer.cpp b/src/rendering/renderer.cpp index 5b76ae3f..6b36f94b 100644 --- a/src/rendering/renderer.cpp +++ b/src/rendering/renderer.cpp @@ -1089,8 +1089,15 @@ void Renderer::updateCharacterAnimation() { } } - // Check if active fidget has completed - if (mountActiveFidget_ != 0) { + // Cancel active fidget immediately if movement starts + if (moving && mountActiveFidget_ != 0) { + mountActiveFidget_ = 0; + // Force play run animation to stop fidget immediately + characterRenderer->playAnimation(mountInstanceId_, mountAnimId, true); + } + + // Check if active fidget has completed (only when not moving) + if (!moving && mountActiveFidget_ != 0) { uint32_t curAnim = 0; float curTime = 0.0f, curDur = 0.0f; if (characterRenderer->getAnimationState(mountInstanceId_, curAnim, curTime, curDur)) { @@ -1120,9 +1127,9 @@ void Renderer::updateCharacterAnimation() { LOG_INFO("Mount idle fidget: playing anim ", fidgetAnim); } - } else if (moving) { + } + if (moving) { mountIdleFidgetTimer_ = 0.0f; // Reset timer when moving - mountActiveFidget_ = 0; // Cancel any active fidget } // Idle ambient sounds: snorts and whinnies only, infrequent