New method, restartMove(), restores the AIPlayer to its normal move-state following animation overrides from AFX. The tag argument is used to match the latest override and prevents interruption of overlapping animation overrides. See related anim-clip changes in Player.[h,cc].
| 1437 | // the latest override and prevents interruption of overlapping animation |
| 1438 | // overrides. See related anim-clip changes in Player.[h,cc]. |
| 1439 | void AIPlayer::restartMove(U32 tag) |
| 1440 | { |
| 1441 | if (tag != 0 && tag == last_anim_tag) |
| 1442 | { |
| 1443 | if (mMoveState_saved != -1) |
| 1444 | { |
| 1445 | mMoveState = (MoveState) mMoveState_saved; |
| 1446 | mMoveState_saved = -1; |
| 1447 | } |
| 1448 | |
| 1449 | bool is_death_anim = ((anim_clip_flags & IS_DEATH_ANIM) != 0); |
| 1450 | |
| 1451 | last_anim_tag = 0; |
| 1452 | anim_clip_flags &= ~(ANIM_OVERRIDDEN | IS_DEATH_ANIM); |
| 1453 | |
| 1454 | if (mDamageState != Enabled) |
| 1455 | { |
| 1456 | if (!is_death_anim) |
| 1457 | { |
| 1458 | // this is a bit hardwired and desperate, |
| 1459 | // but if he's dead he needs to look like it. |
| 1460 | setActionThread("death10", false, false, false); |
| 1461 | } |
| 1462 | } |
| 1463 | } |
| 1464 | } |
| 1465 | |
| 1466 | // New method, saveMoveState(), stores the current movement state |
| 1467 | // so that it can be restored when restartMove() is called. |
no outgoing calls
no test coverage detected