1
0
Fork 0
mirror of https://github.com/OpenMW/openmw.git synced 2025-01-21 06:53:53 +00:00

Fix improper swimming animations in first person mode

This commit is contained in:
scrawl 2015-12-11 01:24:33 +01:00
parent 0efce6cd4c
commit f1f82af64e

View file

@ -397,10 +397,17 @@ void CharacterController::refreshCurrentAnims(CharacterState idle, CharacterStat
}
else
{
if (weap != sWeaponTypeListEnd)
movemask = MWRender::Animation::BlendMask_LowerBody;
movementAnimName.erase(swimpos, 4);
if(!mAnimation->hasAnimation(movementAnimName))
if (weap != sWeaponTypeListEnd)
{
std::string weapMovementAnimName = movementAnimName + weap->shortgroup;
if(mAnimation->hasAnimation(weapMovementAnimName))
movementAnimName = weapMovementAnimName;
else
movemask = MWRender::Animation::BlendMask_LowerBody;
}
if (!mAnimation->hasAnimation(movementAnimName))
movementAnimName.clear();
}
}