mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-03-29 04:20:29 +00:00
Use walk animation as fallback if there's no run animation (Fixes #1578)
This commit is contained in:
parent
78d02d97da
commit
911bd0e340
@ -336,7 +336,17 @@ void CharacterController::refreshCurrentAnims(CharacterState idle, CharacterStat
|
||||
{
|
||||
std::string::size_type swimpos = movement.find("swim");
|
||||
if(swimpos == std::string::npos)
|
||||
movement.clear();
|
||||
{
|
||||
std::string::size_type runpos = movement.find("run");
|
||||
if (runpos != std::string::npos)
|
||||
{
|
||||
movement.replace(runpos, runpos+3, "walk");
|
||||
if (!mAnimation->hasAnimation(movement))
|
||||
movement.clear();
|
||||
}
|
||||
else
|
||||
movement.clear();
|
||||
}
|
||||
else
|
||||
{
|
||||
movegroup = MWRender::Animation::Group_LowerBody;
|
||||
|
Loading…
x
Reference in New Issue
Block a user