mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-01-30 22:15:32 +00:00
Merge pull request #1025 from Allofich/anim
Use loopfallback for idle animation groups
This commit is contained in:
commit
3ef9b3f44d
1 changed files with 6 additions and 3 deletions
|
@ -1542,9 +1542,10 @@ void CharacterController::update(float duration)
|
||||||
mAnimation->disable(mAnimQueue.front().mGroup);
|
mAnimation->disable(mAnimQueue.front().mGroup);
|
||||||
mAnimQueue.pop_front();
|
mAnimQueue.pop_front();
|
||||||
|
|
||||||
|
bool loopfallback = (mAnimQueue.front().mGroup.compare(0,4,"idle") == 0);
|
||||||
mAnimation->play(mAnimQueue.front().mGroup, Priority_Default,
|
mAnimation->play(mAnimQueue.front().mGroup, Priority_Default,
|
||||||
MWRender::Animation::BlendMask_All, false,
|
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);
|
mAnimation->disable(mAnimQueue.front().mGroup);
|
||||||
mAnimQueue.pop_front();
|
mAnimQueue.pop_front();
|
||||||
|
|
||||||
|
bool loopfallback = (mAnimQueue.front().mGroup.compare(0,4,"idle") == 0);
|
||||||
mAnimation->play(mAnimQueue.front().mGroup, Priority_Default,
|
mAnimation->play(mAnimQueue.front().mGroup, Priority_Default,
|
||||||
MWRender::Animation::BlendMask_All, false,
|
MWRender::Animation::BlendMask_All, false,
|
||||||
1.0f, "start", "stop", 0.0f, mAnimQueue.front().mLoopCount);
|
1.0f, "start", "stop", 0.0f, mAnimQueue.front().mLoopCount, loopfallback);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2023,9 +2025,10 @@ bool CharacterController::playGroup(const std::string &groupname, int mode, int
|
||||||
mCurrentIdle.clear();
|
mCurrentIdle.clear();
|
||||||
|
|
||||||
mIdleState = CharState_SpecialIdle;
|
mIdleState = CharState_SpecialIdle;
|
||||||
|
bool loopfallback = (entry.mGroup.compare(0,4,"idle") == 0);
|
||||||
mAnimation->play(groupname, Priority_Default,
|
mAnimation->play(groupname, Priority_Default,
|
||||||
MWRender::Animation::BlendMask_All, false, 1.0f,
|
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)
|
else if(mode == 0)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue