Merge pull request #1003 from Azaezel/alpha41/safeLandings

address #96
This commit is contained in:
Brian Roberts 2023-04-01 10:55:49 -05:00 committed by GitHub
commit 7c67c2c326
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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