MCPcopy Create free account
hub / github.com/Warzone2100/warzone2100 / resetObjectAnimationState

Function resetObjectAnimationState

src/baseobject.cpp:239–254  ·  view source on GitHub ↗

Reset animation state so some units don't walk in place in the menu sometimes.

Source from the content-addressed store, hash-verified

237
238// Reset animation state so some units don't walk in place in the menu sometimes.
239void resetObjectAnimationState(BASE_OBJECT *psObj)
240{
241 if (psObj == nullptr)
242 {
243 return;
244 }
245 if (psObj->type == OBJ_DROID || psObj->type == OBJ_STRUCTURE || psObj->type == OBJ_FEATURE)
246 {
247 psObj->timeAnimationStarted = 0;
248 psObj->animationEvent = ANIM_EVENT_NONE;
249 }
250 else
251 {
252 debug(LOG_WARNING, "Tried resetting animation state on unknown object type");
253 }
254}

Callers 6

structureUpdateFunction · 0.85
saveMissionDataFunction · 0.85
transporterAddDroidFunction · 0.85
moveUpdatePersonModelFunction · 0.85
moveUpdateCyborgModelFunction · 0.85
moveUpdateDroidFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected