Fix: stop previous click animation before starting a new one

Rapid customize clicks would orphan running click animations because
SetClickAnimObjectId overwrote the tracked ID without stopping the old
animation first. When movement later called StopClickAnimation, only
the last animation was stopped, leaving earlier ones driving the ROI
transform and causing the player model to stay behind while the camera
moved forward.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Christian Semmler 2026-03-10 19:45:20 -07:00
parent 1714142b6f
commit 9145a23ffe
No known key found for this signature in database
GPG Key ID: 086DAA1360BEEE5C

View File

@ -700,6 +700,7 @@ void NetworkManager::HandleCustomize(const CustomizeMsg& p_msg)
p_msg.changeType == CHANGE_MOOD
);
if (!it->second->IsMoving() && !it->second->IsInMultiPartEmote()) {
it->second->StopClickAnimation();
MxU32 clickAnimId =
CharacterCustomizer::PlayClickAnimation(it->second->GetROI(), it->second->GetCustomizeState());
it->second->SetClickAnimObjectId(clickAnimId);
@ -734,6 +735,7 @@ void NetworkManager::HandleCustomize(const CustomizeMsg& p_msg)
// Only play click animation in 3rd person (not visible in 1st person or multi-part emote)
if (m_thirdPersonCamera.GetDisplayROI() && !m_thirdPersonCamera.IsInVehicle() &&
!m_thirdPersonCamera.IsInMultiPartEmote()) {
m_thirdPersonCamera.StopClickAnimation();
MxU32 clickAnimId = CharacterCustomizer::PlayClickAnimation(
m_thirdPersonCamera.GetDisplayROI(),
m_thirdPersonCamera.GetCustomizeState()