MCPcopy Create free account
hub / github.com/GarageGames/Torque3D / updateAnimation

Method updateAnimation

Engine/source/T3D/player.cpp:4546–4578  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4544//----------------------------------------------------------------------------
4545
4546void Player::updateAnimation(F32 dt)
4547{
4548 // If dead then remove any image animations
4549 if ((mDamageState == Disabled || mDamageState == Destroyed) && mImageStateThread)
4550 {
4551 // Remove the image state animation
4552 mShapeInstance->destroyThread(mImageStateThread);
4553 mImageStateThread = 0;
4554 }
4555
4556 if ((isGhost() || mActionAnimation.animateOnServer) && mActionAnimation.thread)
4557 mShapeInstance->advanceTime(dt,mActionAnimation.thread);
4558 if (mRecoilThread)
4559 mShapeInstance->advanceTime(dt,mRecoilThread);
4560 if (mImageStateThread)
4561 mShapeInstance->advanceTime(dt,mImageStateThread);
4562
4563 // If we are the client's player on this machine, then we need
4564 // to make sure the transforms are up to date as they are used
4565 // to setup the camera.
4566 if (isGhost())
4567 {
4568 if (getControllingClient())
4569 {
4570 updateAnimationTree(isFirstPerson());
4571 mShapeInstance->animate();
4572 }
4573 else
4574 {
4575 updateAnimationTree(false);
4576 }
4577 }
4578}
4579
4580void Player::updateAnimationTree(bool firstPerson)
4581{

Callers

nothing calls this directly

Calls 3

destroyThreadMethod · 0.45
advanceTimeMethod · 0.45
animateMethod · 0.45

Tested by

no test coverage detected