feat: Add Restart Behavior

Resets the model to the default state at the end of the models frame.  Will see if in the future designers want this to be more strict on the resetting timing.
This commit is contained in:
David Markowitz
2025-06-28 21:18:44 -07:00
parent 55d181ea4b
commit edda646856
4 changed files with 17 additions and 0 deletions

View File

@@ -221,6 +221,8 @@ void Strip::ProcNormalAction(float deltaTime, ModelComponent& modelComponent) {
sound.target = modelComponent.GetParent()->GetObjectID();
sound.soundID = numberAsInt;
sound.Send(UNASSIGNED_SYSTEM_ADDRESS);
} else if (nextActionType == "Restart") {
modelComponent.RestartAtEndOfFrame();
}
/* END Action */
/* BEGIN Gameplay */

View File

@@ -65,6 +65,8 @@ private:
// The position of the parent model on the previous frame
NiPoint3 m_PreviousFramePosition{};
NiPoint3 m_SavedVelocity{};
};
#endif //!__STRIP__H__