File tree Expand file tree Collapse file tree 1 file changed +16
-0
lines changed
Expand file tree Collapse file tree 1 file changed +16
-0
lines changed Original file line number Diff line number Diff line change @@ -1370,6 +1370,8 @@ namespace MWMechanics
13701370
13711371 // If the current weapon type was changed in the middle of attack (e.g. by Equip console command or when bound
13721372 // spell expires), we should force actor to the "weapon equipped" state, interrupt attack and update animations.
1373+ // Morrowind does this at the end of the attack (see #4646 and PR 1972).
1374+ // If we decide to cope with the resulting problems, the thrown weapon->H2H case below should be extended.
13731375 if (isStillWeapon && mWeaponType != weaptype && mUpperBodyState > UpperBodyState::WeaponEquipped)
13741376 {
13751377 forcestateupdate = true ;
@@ -1847,6 +1849,20 @@ namespace MWMechanics
18471849 if (animPlaying)
18481850 mAnimation ->disable (mCurrentWeapon );
18491851
1852+ // Skip Thrown->H2H idle transition (e.g., if we've run out of ammo)
1853+ // In Morrowind this isn't actually specific to this transition
1854+ // See the weapon->weapon mid-attack skip logic above
1855+ if (mUpperBodyState == UpperBodyState::AttackEnd)
1856+ {
1857+ if (weapclass == ESM::WeaponType::Thrown && weaptype == ESM::Weapon::HandToHand)
1858+ {
1859+ forcestateupdate = true ;
1860+ mWeaponType = weaptype;
1861+ mCurrentWeapon = getWeaponAnimation (mWeaponType );
1862+ mAnimation ->showWeapons (false );
1863+ }
1864+ }
1865+
18501866 mUpperBodyState = UpperBodyState::WeaponEquipped;
18511867 }
18521868 else if (mUpperBodyState == UpperBodyState::Unequipping)
You can’t perform that action at this time.
0 commit comments