Use walk animation as fallback if there's no run animation (Fixes #1578)

This commit is contained in:
scrawl 2014-06-28 00:07:13 +02:00
parent 78d02d97da
commit 911bd0e340

View file

@ -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;