1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-01-26 18:35:20 +00:00

Clear 'swim' from the animation name as a backup instead of 'sneak'

This commit is contained in:
Chris Robinson 2013-07-18 00:22:40 -07:00
parent 9ea6b22a83
commit e78bdd2a5d

View File

@ -191,13 +191,13 @@ void CharacterController::refreshCurrentAnims(CharacterState idle, CharacterStat
if(!mAnimation->hasAnimation(movement)) if(!mAnimation->hasAnimation(movement))
{ {
std::string::size_type sneakpos = movement.find("sneak"); std::string::size_type swimpos = movement.find("swim");
if(sneakpos == std::string::npos) if(swimpos == std::string::npos)
movement.clear(); movement.clear();
else else
{ {
movegroup = MWRender::Animation::Group_LowerBody; movegroup = MWRender::Animation::Group_LowerBody;
movement.erase(sneakpos, 5); movement.erase(swimpos, 4);
if(!mAnimation->hasAnimation(movement)) if(!mAnimation->hasAnimation(movement))
movement.clear(); movement.clear();
} }