mirror of
https://github.com/OpenMW/openmw.git
synced 2025-01-20 22:53:54 +00:00
Merge branch 'stagger' into 'openmw-48'
Stagger fixes, 0.48.0 edition See merge request OpenMW/openmw!2259
This commit is contained in:
commit
0fb2c96a69
1 changed files with 16 additions and 12 deletions
|
@ -1482,7 +1482,7 @@ bool CharacterController::updateWeaponState(CharacterState idle)
|
|||
}
|
||||
|
||||
mAnimation->play(mCurrentWeapon, priorityWeapon,
|
||||
MWRender::Animation::BlendMask_All, true,
|
||||
MWRender::Animation::BlendMask_All, false,
|
||||
1, startKey, stopKey,
|
||||
0.0f, 0);
|
||||
mUpperBodyState = UpperCharState_CastingSpell;
|
||||
|
@ -1509,7 +1509,7 @@ bool CharacterController::updateWeaponState(CharacterState idle)
|
|||
Security(mPtr).probeTrap(target, item, resultMessage, resultSound);
|
||||
}
|
||||
mAnimation->play(mCurrentWeapon, priorityWeapon,
|
||||
MWRender::Animation::BlendMask_All, true,
|
||||
MWRender::Animation::BlendMask_All, false,
|
||||
1.0f, "start", "stop", 0.0, 0);
|
||||
mUpperBodyState = UpperCharState_FollowStartToFollowStop;
|
||||
|
||||
|
@ -1675,7 +1675,7 @@ bool CharacterController::updateWeaponState(CharacterState idle)
|
|||
}
|
||||
}
|
||||
|
||||
if(!animPlaying)
|
||||
if (!animPlaying || complete >= 1.f)
|
||||
{
|
||||
if(mUpperBodyState == UpperCharState_EquipingWeap ||
|
||||
mUpperBodyState == UpperCharState_FollowStartToFollowStop ||
|
||||
|
@ -1689,12 +1689,21 @@ bool CharacterController::updateWeaponState(CharacterState idle)
|
|||
if (mUpperBodyState != UpperCharState_EquipingWeap && isRecovery())
|
||||
mAnimation->disable(mCurrentHit);
|
||||
|
||||
if (animPlaying)
|
||||
mAnimation->disable(mCurrentWeapon);
|
||||
|
||||
mUpperBodyState = UpperCharState_WeapEquiped;
|
||||
}
|
||||
else if(mUpperBodyState == UpperCharState_UnEquipingWeap)
|
||||
{
|
||||
if (animPlaying)
|
||||
mAnimation->disable(mCurrentWeapon);
|
||||
|
||||
mUpperBodyState = UpperCharState_Nothing;
|
||||
}
|
||||
}
|
||||
else if(complete >= 1.0f && !isRandomAttackAnimation(mCurrentWeapon))
|
||||
|
||||
if (complete >= 1.0f && !isRandomAttackAnimation(mCurrentWeapon))
|
||||
{
|
||||
std::string start, stop;
|
||||
switch(mUpperBodyState)
|
||||
|
@ -1773,19 +1782,14 @@ bool CharacterController::updateWeaponState(CharacterState idle)
|
|||
mask = MWRender::Animation::BlendMask_UpperBody;
|
||||
|
||||
mAnimation->disable(mCurrentWeapon);
|
||||
if (mUpperBodyState == UpperCharState_FollowStartToFollowStop)
|
||||
mAnimation->play(mCurrentWeapon, priorityWeapon,
|
||||
mask, true,
|
||||
weapSpeed, start, stop, 0.0f, 0);
|
||||
else
|
||||
mAnimation->play(mCurrentWeapon, priorityWeapon,
|
||||
mask, false,
|
||||
weapSpeed, start, stop, 0.0f, 0);
|
||||
mAnimation->play(mCurrentWeapon, priorityWeapon, mask, false, weapSpeed, start, stop, 0.0f, 0);
|
||||
}
|
||||
}
|
||||
else if(complete >= 1.0f && isRandomAttackAnimation(mCurrentWeapon))
|
||||
{
|
||||
clearStateAnimation(mCurrentWeapon);
|
||||
if (isRecovery())
|
||||
mAnimation->disable(mCurrentHit);
|
||||
mUpperBodyState = UpperCharState_WeapEquiped;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue