| 1592 | } |
| 1593 | |
| 1594 | void afxShapeConstraint::remapAnimation(U32 tag, ShapeBase* other_shape) |
| 1595 | { |
| 1596 | if (mClip_tag == 0) |
| 1597 | return; |
| 1598 | |
| 1599 | if (!mShape) |
| 1600 | return; |
| 1601 | |
| 1602 | if (!other_shape) |
| 1603 | { |
| 1604 | resetAnimation(tag); |
| 1605 | return; |
| 1606 | } |
| 1607 | |
| 1608 | Con::errorf("remapAnimation -- Clip name, %s.", mShape->getLastClipName(tag)); |
| 1609 | |
| 1610 | if (mShape->isClientObject()) |
| 1611 | { |
| 1612 | mShape->restoreAnimation(tag); |
| 1613 | } |
| 1614 | else |
| 1615 | { |
| 1616 | AIPlayer* ai_player = dynamic_cast<AIPlayer*>(mShape); |
| 1617 | if (ai_player) |
| 1618 | ai_player->restartMove(tag); |
| 1619 | else |
| 1620 | mShape->restoreAnimation(tag); |
| 1621 | } |
| 1622 | |
| 1623 | mClip_tag = 0; |
| 1624 | } |
| 1625 | |
| 1626 | void afxShapeConstraint::resetAnimation(U32 tag) |
| 1627 | { |
nothing calls this directly
no test coverage detected