MCPcopy Create free account
hub / github.com/DescentDevelopers/Descent3 / aObjPlayImmAnim

Function aObjPlayImmAnim

scripts/Merc4.cpp:635–645  ·  view source on GitHub ↗

$$ACTION Custom Play imediate object [o:Object] animation from frame [i:StartFrame] to [i:EndFrame=1], cycle time = [f:CycleTime=1.0], looping = [b:Looping=FALSE] aObjPlayImmAnim Play object animation Plays an animation for an object Parameters: Object: the object to animate StartFrame: the frame number of the start of the animation EndFrame: the frame number of the end of the animation C

Source from the content-addressed store, hash-verified

633$$END
634*/
635void aObjPlayImmAnim(int objref, int startframe, int endframe, float cycletime, bool looping) {
636 int flags = 0;
637
638 if (!qObjExists(objref))
639 return;
640
641 if (looping)
642 flags |= AIAF_LOOPING;
643
644 Obj_SetCustomAnim(objref, (float)startframe, (float)endframe, cycletime, flags | AIAF_IMMEDIATE, -1, -1);
645}
646
647/*
648$$ACTION

Callers 1

CallEventMethod · 0.85

Calls 2

qObjExistsFunction · 0.85
Obj_SetCustomAnimFunction · 0.85

Tested by

no test coverage detected