| 4544 | //---------------------------------------------------------------------------- |
| 4545 | |
| 4546 | void 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 | |
| 4580 | void Player::updateAnimationTree(bool firstPerson) |
| 4581 | { |
nothing calls this directly
no test coverage detected