interrupt rotations and save interrupt count across resets

This commit is contained in:
David Markowitz
2026-09-30 19:23:23 -07:00
parent c10828a905
commit ee5d39b79e
4 changed files with 17 additions and 1 deletions

View File

@@ -47,7 +47,10 @@ bool ModelComponent::OnResetModelToDefaults(GameMessages::ResetModelToDefaults&
if (reset.bResetPos) m_Parent->SetPosition(m_OriginalPosition);
if (reset.bResetRot) m_Parent->SetRotation(m_OriginalRotation);
m_Parent->SetVelocity(NiPoint3Constant::ZERO);
// Save and increment the interrupt count so other behaviors on this model move to their next action instead of getting stuck
const auto moveInterruptCount = m_Move.interruptCount + 1;
m_Move = MoveState{};
m_Move.interruptCount = moveInterruptCount;
SyncLinearVelocity();
ResetRotationState(m_Parent->GetRotation());