mirror of
https://github.com/OpenMW/openmw.git
synced 2025-01-16 17:59:56 +00:00
Merge pull request #2482 from akortunov/arrows
Update weapon state when we cancel attack animation
This commit is contained in:
commit
25dc06db73
2 changed files with 8 additions and 0 deletions
|
@ -121,6 +121,7 @@
|
|||
Bug #5105: NPCs start combat with werewolves from any distance
|
||||
Bug #5110: ModRegion with a redundant numerical argument breaks script execution
|
||||
Bug #5123: Script won't run on respawn
|
||||
Bug #5124: Arrow remains attached to actor if pulling animation was cancelled
|
||||
Feature #1774: Handle AvoidNode
|
||||
Feature #2229: Improve pathfinding AI
|
||||
Feature #3025: Analogue gamepad movement controls
|
||||
|
|
|
@ -315,6 +315,8 @@ void CharacterController::refreshHitRecoilAnims(CharacterState& idle)
|
|||
{
|
||||
mAnimation->disable(mCurrentWeapon);
|
||||
mUpperBodyState = UpperCharState_WeapEquiped;
|
||||
if (mWeaponType > WeapType_HandToHand && mWeaponType < WeapType_Spell)
|
||||
mAnimation->showWeapons(true);
|
||||
}
|
||||
else if (mUpperBodyState > UpperCharState_Nothing && mUpperBodyState < UpperCharState_WeapEquiped)
|
||||
{
|
||||
|
@ -1321,6 +1323,7 @@ bool CharacterController::updateWeaponState(CharacterState& idle)
|
|||
mUpperBodyState = UpperCharState_WeapEquiped;
|
||||
mAttackingOrSpell = false;
|
||||
mAnimation->disable(mCurrentWeapon);
|
||||
mAnimation->showWeapons(true);
|
||||
if (mPtr == getPlayer())
|
||||
MWBase::Environment::get().getWorld()->getPlayer().setAttackingOrSpell(false);
|
||||
}
|
||||
|
@ -1726,7 +1729,11 @@ bool CharacterController::updateWeaponState(CharacterState& idle)
|
|||
else if (isKnockedDown())
|
||||
{
|
||||
if (mUpperBodyState > UpperCharState_WeapEquiped)
|
||||
{
|
||||
mUpperBodyState = UpperCharState_WeapEquiped;
|
||||
if (mWeaponType > WeapType_HandToHand && mWeaponType < WeapType_Spell)
|
||||
mAnimation->showWeapons(true);
|
||||
}
|
||||
mAnimation->disable(mCurrentWeapon);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue