feat: add speed behavior (#1831)

This commit is contained in:
David Markowitz
2025-06-25 02:04:25 -07:00
committed by GitHub
parent 2618e9a864
commit 1f580491c7
3 changed files with 21 additions and 4 deletions

View File

@@ -37,6 +37,7 @@ bool ModelComponent::OnResetModelToDefaults(GameMessages::GameMsg& msg) {
m_Parent->SetRotation(m_OriginalRotation);
m_Parent->SetVelocity(NiPoint3Constant::ZERO);
m_Speed = 3.0f;
m_NumListeningInteract = 0;
m_NumActiveUnSmash = 0;
m_Dirty = true;
@@ -279,6 +280,7 @@ bool ModelComponent::TrySetVelocity(const NiPoint3& velocity) const {
currentVelocity = velocity;
}
currentVelocity *= m_Speed;
m_Parent->SetVelocity(currentVelocity);
return true;
}