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

Method restoreAnimation

Engine/source/T3D/player.cpp:7397–7436  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

7395// anim-clip component effect.
7396
7397void Player::restoreAnimation(U32 tag)
7398{
7399 // check if this is a blended clip
7400 if ((tag & BLENDED_CLIP) != 0)
7401 {
7402 restoreBlendAnimation(tag);
7403 return;
7404 }
7405
7406 if (tag != 0 && tag == last_anim_tag)
7407 {
7408 bool is_death_anim = ((anim_clip_flags & IS_DEATH_ANIM) != 0);
7409
7410 anim_clip_flags &= ~(ANIM_OVERRIDDEN | IS_DEATH_ANIM);
7411
7412 if (isClientObject())
7413 {
7414 if (mDamageState != Enabled)
7415 {
7416 if (!is_death_anim)
7417 {
7418 // this is a bit hardwired and desperate,
7419 // but if he's dead he needs to look like it.
7420 setActionThread("death10", false, false, false);
7421 }
7422 }
7423 else if (mState != MoveState)
7424 {
7425 // not sure what happens here
7426 }
7427 else
7428 {
7429 pickActionAnimation();
7430 }
7431 }
7432
7433 last_anim_tag = 0;
7434 last_anim_id = -1;
7435 }
7436}
7437
7438U32 Player::getAnimationID(const char* name)
7439{

Callers 2

remapAnimationMethod · 0.45
resetAnimationMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected