From 6163c7bb03f1ec38b449788745caeb42f25f5200 Mon Sep 17 00:00:00 2001 From: Allofich Date: Tue, 16 Aug 2016 01:15:26 +0900 Subject: [PATCH 1/2] Use loopfallback for idle animation groups --- apps/openmw/mwmechanics/character.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/apps/openmw/mwmechanics/character.cpp b/apps/openmw/mwmechanics/character.cpp index e65195531..14b235cd8 100644 --- a/apps/openmw/mwmechanics/character.cpp +++ b/apps/openmw/mwmechanics/character.cpp @@ -2023,9 +2023,10 @@ bool CharacterController::playGroup(const std::string &groupname, int mode, int mCurrentIdle.clear(); mIdleState = CharState_SpecialIdle; + bool loopfallback = (entry.mGroup.compare(0,4,"idle") == 0); mAnimation->play(groupname, Priority_Default, MWRender::Animation::BlendMask_All, false, 1.0f, - ((mode==2) ? "loop start" : "start"), "stop", 0.0f, count-1); + ((mode==2) ? "loop start" : "start"), "stop", 0.0f, count-1, loopfallback); } else if(mode == 0) { From c05782581e3c224c092865b03a871a9f8dbb2753 Mon Sep 17 00:00:00 2001 From: Allofich Date: Tue, 16 Aug 2016 02:47:37 +0900 Subject: [PATCH 2/2] Account for all instances of play() --- apps/openmw/mwmechanics/character.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/apps/openmw/mwmechanics/character.cpp b/apps/openmw/mwmechanics/character.cpp index 14b235cd8..c92530259 100644 --- a/apps/openmw/mwmechanics/character.cpp +++ b/apps/openmw/mwmechanics/character.cpp @@ -1542,9 +1542,10 @@ void CharacterController::update(float duration) mAnimation->disable(mAnimQueue.front().mGroup); mAnimQueue.pop_front(); + bool loopfallback = (mAnimQueue.front().mGroup.compare(0,4,"idle") == 0); mAnimation->play(mAnimQueue.front().mGroup, Priority_Default, MWRender::Animation::BlendMask_All, false, - 1.0f, "start", "stop", 0.0f, mAnimQueue.front().mLoopCount); + 1.0f, "start", "stop", 0.0f, mAnimQueue.front().mLoopCount, loopfallback); } } } @@ -1822,9 +1823,10 @@ void CharacterController::update(float duration) mAnimation->disable(mAnimQueue.front().mGroup); mAnimQueue.pop_front(); + bool loopfallback = (mAnimQueue.front().mGroup.compare(0,4,"idle") == 0); mAnimation->play(mAnimQueue.front().mGroup, Priority_Default, MWRender::Animation::BlendMask_All, false, - 1.0f, "start", "stop", 0.0f, mAnimQueue.front().mLoopCount); + 1.0f, "start", "stop", 0.0f, mAnimQueue.front().mLoopCount, loopfallback); } }