mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-01-28 14:53:58 +00:00
Merge branch 'idleisthepriority' into 'master'
Fix fallback for missing swim/sneak idle animations See merge request OpenMW/openmw!2013
This commit is contained in:
commit
81e1d72c64
@ -701,12 +701,16 @@ void CharacterController::refreshIdleAnims(CharacterState idle, bool force)
|
|||||||
size_t numLoops = ~0ul;
|
size_t numLoops = ~0ul;
|
||||||
|
|
||||||
std::string idleGroup = idleStateToAnimGroup(mIdleState);
|
std::string idleGroup = idleStateToAnimGroup(mIdleState);
|
||||||
MWRender::Animation::AnimPriority priority = getIdlePriority(mIdleState);
|
|
||||||
|
|
||||||
// Only play "idleswim" or "idlesneak" if they exist. Otherwise, fallback to
|
// Only play "idleswim" or "idlesneak" if they exist. Otherwise, fallback to
|
||||||
// "idle"+weapon or "idle".
|
// "idle"+weapon or "idle".
|
||||||
if ((mIdleState == CharState_IdleSwim || mIdleState == CharState_IdleSneak) && !mAnimation->hasAnimation(idleGroup))
|
if ((mIdleState == CharState_IdleSwim || mIdleState == CharState_IdleSneak) && !mAnimation->hasAnimation(idleGroup))
|
||||||
idleGroup = idleStateToAnimGroup(CharState_Idle);
|
{
|
||||||
|
mIdleState = CharState_Idle;
|
||||||
|
idleGroup = idleStateToAnimGroup(mIdleState);
|
||||||
|
}
|
||||||
|
|
||||||
|
MWRender::Animation::AnimPriority priority = getIdlePriority(mIdleState);
|
||||||
|
|
||||||
if (idleGroup.empty())
|
if (idleGroup.empty())
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user