From 1fb4f57f6e6589346665603f83d79330746ea20d Mon Sep 17 00:00:00 2001 From: AzaezelX Date: Thu, 30 Mar 2023 14:19:50 -0500 Subject: [PATCH] adress #96 --- Engine/source/T3D/player.cpp | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/Engine/source/T3D/player.cpp b/Engine/source/T3D/player.cpp index 1aced35ff..0b0a4cb42 100644 --- a/Engine/source/T3D/player.cpp +++ b/Engine/source/T3D/player.cpp @@ -2269,10 +2269,14 @@ void Player::setState(ActionState state, U32 recoverTicks) case RecoverState: { if (mDataBlock->landSequenceTime > 0.0f) { - // Use the land sequence as the basis for the recovery - setActionThread(PlayerData::LandAnim, true, false, true, true); - F32 timeScale = mShapeInstance->getDuration(mActionAnimation.thread) / mDataBlock->landSequenceTime; - mShapeInstance->setTimeScale(mActionAnimation.thread,timeScale); + PlayerData::ActionAnimation& anim = mDataBlock->actionList[PlayerData::LandAnim]; + if (anim.sequence != -1) + { + // Use the land sequence as the basis for the recovery + setActionThread(PlayerData::LandAnim, true, false, true, true); + F32 timeScale = mShapeInstance->getDuration(mActionAnimation.thread) / mDataBlock->landSequenceTime; + mShapeInstance->setTimeScale(mActionAnimation.thread, timeScale); + } mRecoverDelay = mDataBlock->landSequenceTime; } else