mirror of
https://github.com/OpenMW/openmw.git
synced 2025-01-22 07:53:52 +00:00
Loop the current animation if there's nothing more queued
This commit is contained in:
parent
00879ab20e
commit
8fa1b56efc
1 changed files with 7 additions and 0 deletions
|
@ -107,6 +107,11 @@ void CharacterController::markerEvent(const std::string &evt)
|
|||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if(evt.compare(ms, evt.length()-ms, "loop stop") == 0 || evt.compare(ms, evt.length()-ms, "stop") == 0)
|
||||
mAnimation->play(mCurrentGroup, "loop start");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
@ -130,6 +135,7 @@ void CharacterController::playGroup(const std::string &groupname, int mode, int
|
|||
mAnimQueue.clear();
|
||||
while(count-- > 0)
|
||||
mAnimQueue.push_back(groupname);
|
||||
mAnimQueue.push_back("idle");
|
||||
mCurrentGroup = groupname;
|
||||
mAnimation->play(mCurrentGroup, ((mode==2) ? "loop start" : "start"));
|
||||
}
|
||||
|
@ -138,6 +144,7 @@ void CharacterController::playGroup(const std::string &groupname, int mode, int
|
|||
mAnimQueue.resize(1);
|
||||
while(count-- > 0)
|
||||
mAnimQueue.push_back(groupname);
|
||||
mAnimQueue.push_back("idle");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue