forked from teamnwah/openmw-tes3coop
Use walk animation as fallback if there's no run animation (Fixes #1578)
This commit is contained in:
parent
78d02d97da
commit
911bd0e340
1 changed files with 11 additions and 1 deletions
|
@ -336,7 +336,17 @@ void CharacterController::refreshCurrentAnims(CharacterState idle, CharacterStat
|
||||||
{
|
{
|
||||||
std::string::size_type swimpos = movement.find("swim");
|
std::string::size_type swimpos = movement.find("swim");
|
||||||
if(swimpos == std::string::npos)
|
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
|
else
|
||||||
{
|
{
|
||||||
movegroup = MWRender::Animation::Group_LowerBody;
|
movegroup = MWRender::Animation::Group_LowerBody;
|
||||||
|
|
Loading…
Reference in a new issue