1
0
Fork 0
mirror of https://github.com/OpenMW/openmw.git synced 2025-02-03 18:15:35 +00:00

Fix swim spellcasting stance turning fallback

This commit is contained in:
Alexei Kotov 2022-06-13 23:58:36 +03:00
parent 5dfce6205a
commit 4ce08664e9

View file

@ -573,6 +573,7 @@ void CharacterController::refreshMovementAnims(CharacterState movement, bool for
return;
}
mMovementState = movement;
std::string::size_type swimpos = movementAnimName.find("swim");
if (!mAnimation->hasAnimation(movementAnimName))
{
@ -590,7 +591,7 @@ void CharacterController::refreshMovementAnims(CharacterState movement, bool for
{
std::string weapMovementAnimName;
// Spellcasting stance turning is a special case
if (mWeaponType == ESM::Weapon::Spell && (movement == CharState_TurnLeft || movement == CharState_TurnRight))
if (mWeaponType == ESM::Weapon::Spell && isTurning())
weapMovementAnimName = weapShortGroup + movementAnimName;
else
weapMovementAnimName = movementAnimName + weapShortGroup;
@ -616,8 +617,6 @@ void CharacterController::refreshMovementAnims(CharacterState movement, bool for
}
}
mMovementState = movement;
// If we're playing the same animation, start it from the point it ended
float startpoint = 0.f;
if (!mCurrentMovement.empty() && movementAnimName == mCurrentMovement)