Reset animation state so some units don't walk in place in the menu sometimes.
| 237 | |
| 238 | // Reset animation state so some units don't walk in place in the menu sometimes. |
| 239 | void 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 | } |
no outgoing calls
no test coverage detected