MCPcopy Create free account
hub / github.com/TorqueGameEngines/Torque3D / remapAnimation

Method remapAnimation

Engine/source/afx/afxConstraint.cpp:1594–1624  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1592}
1593
1594void 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
1626void afxShapeConstraint::resetAnimation(U32 tag)
1627{

Callers

nothing calls this directly

Calls 5

isClientObjectMethod · 0.80
restartMoveMethod · 0.80
errorfFunction · 0.50
getLastClipNameMethod · 0.45
restoreAnimationMethod · 0.45

Tested by

no test coverage detected