Merge branch 'hopechess' into 'master'

Unequip the weapon only after finishing the attack (bug #4610)

Closes #4610

See merge request OpenMW/openmw!2719
7220-lua-add-a-general-purpose-lexical-parser
psi29a 2 years ago
commit 8040d7a72a

@ -3,6 +3,7 @@
Bug #4127: Weapon animation looks choppy
Bug #4204: Dead slaughterfish doesn't float to water surface after loading saved game
Bug #4610: Casting a Bound Weapon spell cancels the casting animation by equipping the weapon prematurely
Bug #4816: GetWeaponDrawn returns 1 before weapon is attached
Bug #5057: Weapon swing sound plays at same pitch whether it hits or misses
Bug #5129: Stuttering animation on Centurion Archer

@ -1321,7 +1321,8 @@ namespace MWMechanics
{
std::string weapgroup;
if ((!isWerewolf || mWeaponType != ESM::Weapon::Spell) && weaptype != mWeaponType
&& mUpperBodyState != UpperBodyState::Unequipping && !isStillWeapon)
&& mUpperBodyState <= UpperBodyState::AttackWindUp && mUpperBodyState != UpperBodyState::Unequipping
&& !isStillWeapon)
{
// We can not play un-equip animation if weapon changed since last update
if (!weaponChanged)
@ -1363,7 +1364,7 @@ namespace MWMechanics
{
// Weapon is changed, no current animation (e.g. unequipping or attack).
// Start equipping animation now.
if (weaptype != mWeaponType)
if (weaptype != mWeaponType && mUpperBodyState <= UpperBodyState::WeaponEquipped)
{
forcestateupdate = true;
bool useShieldAnims = mAnimation->useShieldAnimations();

Loading…
Cancel
Save