mirror of
https://github.com/OpenMW/openmw.git
synced 2025-02-26 07:09:43 +00:00
Stagger fixes, 0.48.0 edition
This commit is contained in:
parent
bc79de4934
commit
2f5f2bdbad
1 changed files with 16 additions and 12 deletions
|
@ -1482,7 +1482,7 @@ bool CharacterController::updateWeaponState(CharacterState idle)
|
||||||
}
|
}
|
||||||
|
|
||||||
mAnimation->play(mCurrentWeapon, priorityWeapon,
|
mAnimation->play(mCurrentWeapon, priorityWeapon,
|
||||||
MWRender::Animation::BlendMask_All, true,
|
MWRender::Animation::BlendMask_All, false,
|
||||||
1, startKey, stopKey,
|
1, startKey, stopKey,
|
||||||
0.0f, 0);
|
0.0f, 0);
|
||||||
mUpperBodyState = UpperCharState_CastingSpell;
|
mUpperBodyState = UpperCharState_CastingSpell;
|
||||||
|
@ -1509,7 +1509,7 @@ bool CharacterController::updateWeaponState(CharacterState idle)
|
||||||
Security(mPtr).probeTrap(target, item, resultMessage, resultSound);
|
Security(mPtr).probeTrap(target, item, resultMessage, resultSound);
|
||||||
}
|
}
|
||||||
mAnimation->play(mCurrentWeapon, priorityWeapon,
|
mAnimation->play(mCurrentWeapon, priorityWeapon,
|
||||||
MWRender::Animation::BlendMask_All, true,
|
MWRender::Animation::BlendMask_All, false,
|
||||||
1.0f, "start", "stop", 0.0, 0);
|
1.0f, "start", "stop", 0.0, 0);
|
||||||
mUpperBodyState = UpperCharState_FollowStartToFollowStop;
|
mUpperBodyState = UpperCharState_FollowStartToFollowStop;
|
||||||
|
|
||||||
|
@ -1675,7 +1675,7 @@ bool CharacterController::updateWeaponState(CharacterState idle)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!animPlaying)
|
if (!animPlaying || complete >= 1.f)
|
||||||
{
|
{
|
||||||
if(mUpperBodyState == UpperCharState_EquipingWeap ||
|
if(mUpperBodyState == UpperCharState_EquipingWeap ||
|
||||||
mUpperBodyState == UpperCharState_FollowStartToFollowStop ||
|
mUpperBodyState == UpperCharState_FollowStartToFollowStop ||
|
||||||
|
@ -1689,12 +1689,21 @@ bool CharacterController::updateWeaponState(CharacterState idle)
|
||||||
if (mUpperBodyState != UpperCharState_EquipingWeap && isRecovery())
|
if (mUpperBodyState != UpperCharState_EquipingWeap && isRecovery())
|
||||||
mAnimation->disable(mCurrentHit);
|
mAnimation->disable(mCurrentHit);
|
||||||
|
|
||||||
|
if (animPlaying)
|
||||||
|
mAnimation->disable(mCurrentWeapon);
|
||||||
|
|
||||||
mUpperBodyState = UpperCharState_WeapEquiped;
|
mUpperBodyState = UpperCharState_WeapEquiped;
|
||||||
}
|
}
|
||||||
else if(mUpperBodyState == UpperCharState_UnEquipingWeap)
|
else if(mUpperBodyState == UpperCharState_UnEquipingWeap)
|
||||||
|
{
|
||||||
|
if (animPlaying)
|
||||||
|
mAnimation->disable(mCurrentWeapon);
|
||||||
|
|
||||||
mUpperBodyState = UpperCharState_Nothing;
|
mUpperBodyState = UpperCharState_Nothing;
|
||||||
}
|
}
|
||||||
else if(complete >= 1.0f && !isRandomAttackAnimation(mCurrentWeapon))
|
}
|
||||||
|
|
||||||
|
if (complete >= 1.0f && !isRandomAttackAnimation(mCurrentWeapon))
|
||||||
{
|
{
|
||||||
std::string start, stop;
|
std::string start, stop;
|
||||||
switch(mUpperBodyState)
|
switch(mUpperBodyState)
|
||||||
|
@ -1773,19 +1782,14 @@ bool CharacterController::updateWeaponState(CharacterState idle)
|
||||||
mask = MWRender::Animation::BlendMask_UpperBody;
|
mask = MWRender::Animation::BlendMask_UpperBody;
|
||||||
|
|
||||||
mAnimation->disable(mCurrentWeapon);
|
mAnimation->disable(mCurrentWeapon);
|
||||||
if (mUpperBodyState == UpperCharState_FollowStartToFollowStop)
|
mAnimation->play(mCurrentWeapon, priorityWeapon, mask, false, weapSpeed, start, stop, 0.0f, 0);
|
||||||
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);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if(complete >= 1.0f && isRandomAttackAnimation(mCurrentWeapon))
|
else if(complete >= 1.0f && isRandomAttackAnimation(mCurrentWeapon))
|
||||||
{
|
{
|
||||||
clearStateAnimation(mCurrentWeapon);
|
clearStateAnimation(mCurrentWeapon);
|
||||||
|
if (isRecovery())
|
||||||
|
mAnimation->disable(mCurrentHit);
|
||||||
mUpperBodyState = UpperCharState_WeapEquiped;
|
mUpperBodyState = UpperCharState_WeapEquiped;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue