feat: Add Restart Behavior (#1836)

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-29 00:22:20 -07:00
committed by GitHub
parent 55d181ea4b
commit c697f8ad97
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__