1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-01-03 17:37:18 +00:00

Merge branch 'blocking' into 'master'

Fix lower body blocking animation priority (bug #5656)

Closes #5656

See merge request OpenMW/openmw!359
This commit is contained in:
psi29a 2020-10-21 22:32:24 +00:00
commit 4ae504970f
2 changed files with 4 additions and 2 deletions

View File

@ -58,6 +58,7 @@
Bug #5622: Can't properly interact with the console when in pause menu
Bug #5639: Tooltips cover Messageboxes
Bug #5644: Summon effects running on the player during game initialization cause crashes
Bug #5656: Sneaking characters block hits while standing
Feature #390: 3rd person look "over the shoulder"
Feature #2386: Distant Statics in the form of Object Paging
Feature #2404: Levelled List can not be placed into a container

View File

@ -270,6 +270,7 @@ void CharacterController::refreshHitRecoilAnims(CharacterState& idle)
mCurrentHit = "shield";
MWRender::Animation::AnimPriority priorityBlock (Priority_Hit);
priorityBlock[MWRender::Animation::BoneGroup_LeftArm] = Priority_Block;
priorityBlock[MWRender::Animation::BoneGroup_LowerBody] = Priority_WeaponLowerBody;
mAnimation->play(mCurrentHit, priorityBlock, MWRender::Animation::BlendMask_All, true, 1, "block start", "block stop", 0.0f, 0);
}
@ -289,6 +290,8 @@ void CharacterController::refreshHitRecoilAnims(CharacterState& idle)
mUpperBodyState = UpperCharState_Nothing;
}
}
if (mHitState != CharState_None)
idle = CharState_None;
}
else if(!mAnimation->isPlaying(mCurrentHit))
{
@ -308,8 +311,6 @@ void CharacterController::refreshHitRecoilAnims(CharacterState& idle)
mAnimation->disable(mCurrentHit);
mAnimation->play(mCurrentHit, Priority_Knockdown, MWRender::Animation::BlendMask_All, true, 1, "loop stop", "stop", 0.0f, 0);
}
if (mHitState != CharState_None)
idle = CharState_None;
}
void CharacterController::refreshJumpAnims(const std::string& weapShortGroup, JumpingState jump, CharacterState& idle, bool force)