1
0
Fork 1
mirror of https://github.com/TES3MP/openmw-tes3mp.git synced 2025-01-29 21:45:32 +00:00

Keep playing IdleSneak on the lower body when casting spells / using weapons

This commit is contained in:
scrawl 2015-09-16 16:14:17 +02:00
parent 5692ef1eae
commit 126960261f
4 changed files with 7 additions and 3 deletions

View file

@ -483,7 +483,10 @@ void CharacterController::refreshCurrentAnims(CharacterState idle, CharacterStat
idlePriority = Priority_SwimIdle;
}
else if(mIdleState == CharState_IdleSneak && mAnimation->hasAnimation("idlesneak"))
{
idle = "idlesneak";
idlePriority[MWRender::Animation::BoneGroup_LowerBody] = Priority_SneakIdleLowerBody;
}
else if(mIdleState != CharState_None)
{
idle = "idle";

View file

@ -29,6 +29,7 @@ class CreatureStats;
enum Priority {
Priority_Default,
Priority_WeaponLowerBody,
Priority_SneakIdleLowerBody,
Priority_SwimIdle,
Priority_Jump,
Priority_Movement,

View file

@ -680,7 +680,7 @@ namespace MWRender
if(!(state->second.mBlendMask&(1<<blendMask)))
continue;
if(active == mStates.end() || active->second.mPriority[blendMask] < state->second.mPriority[blendMask])
if(active == mStates.end() || active->second.mPriority[(BoneGroup)blendMask] < state->second.mPriority[(BoneGroup)blendMask])
active = state;
}

View file

@ -105,12 +105,12 @@ public:
return true;
}
int& operator[] (int n)
int& operator[] (BoneGroup n)
{
return mPriority[n];
}
const int& operator[] (int n) const
const int& operator[] (BoneGroup n) const
{
return mPriority[n];
}