mirror of
https://github.com/OpenMW/openmw.git
synced 2025-02-01 09:15:36 +00:00
Pass "loop stop" to the character controller
This commit is contained in:
parent
d7c9df16f8
commit
6c85d6763a
2 changed files with 11 additions and 2 deletions
|
@ -150,6 +150,15 @@ void CharacterController::updatePtr(const MWWorld::Ptr &ptr)
|
|||
|
||||
void CharacterController::markerEvent(float time, const std::string &evt)
|
||||
{
|
||||
if(evt == "loop stop")
|
||||
{
|
||||
if(mAnimQueue.size() >= 2 && mAnimQueue[0] == mAnimQueue[1])
|
||||
{
|
||||
mAnimQueue.pop_front();
|
||||
mAnimation->play(mCurrentGroup, "loop start", "stop", false);
|
||||
}
|
||||
return;
|
||||
}
|
||||
if(evt == "stop")
|
||||
{
|
||||
if(mAnimQueue.size() >= 2 && mAnimQueue[0] == mAnimQueue[1])
|
||||
|
|
|
@ -409,10 +409,10 @@ bool Animation::handleEvent(float time, const std::string &evt)
|
|||
reset("loop start");
|
||||
if(mCurrentTime >= time)
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
if(evt == "stop")
|
||||
else if(evt == "stop")
|
||||
{
|
||||
if(mLooping)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue