1
0
Fork 0
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:
Alexei Dobrohotov 2019-08-09 12:44:08 +03:00 committed by GitHub
commit 25dc06db73
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 0 deletions

View file

@ -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

View file

@ -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);
}
}