Project

General

Profile

Bug #2639

Attacking flag isn't reset upon reloading

Added by Nicola Bodill over 2 years ago. Updated 2 months ago.

Status:
Closed
Priority:
Normal
Category:
Game Mechanics
Target version:
Start date:
06/09/2015
% Done:

100%

Reproducibility:
Always
Operating system:
Other
Severity:
Normal

Description

To reproduce, do not click the 'attack' button after reloading.

Effects:
1. The player can't switch from 1st to 3rd person until either sheathing the weapon or swinging it.
2. The sheathe/draw weapon animation does not work correctly until the player has switched to 3rd person.
3. After switching to 3rd person the player is temporarily frozen in the 'swing' position.

Am using OSG port on Windows 8.1. Relevant save attached below:

SwingWeaponGlitch.omwsave (411 KB) Nicola Bodill, 06/09/2015 07:03 PM


Related issues

Related to OpenMW - Bug #2153: Weapon swing animation gets stuck when opening inventory Rejected 11/24/2014

Associated revisions

Revision 44738e11 (diff)
Added by Andrei Kortunov 2 months ago

Clear player fields upon reload (bug #2639)

Revision a8c287b6
Added by scrawl . 2 months ago

Merge pull request #1447 from akortunov/stancechangefixes

Clear player fields upon reload (bug #2639)

History

#1 Updated by scrawl . over 2 years ago

  • Related to Bug #2153: Weapon swing animation gets stuck when opening inventory added

#2 Updated by Andrei Kortunov 2 months ago

  • Status changed from New to Feedback needed

An attached savegame works fine for me.
Can anyone reproduce this bug in upstream master?

#3 Updated by Alexei Dobrohotov 2 months ago

I can. All input is delayed after loading a save in the current session until player releases the weapon, so the glitches listed in the report are not really glitches. Here's an interesting thing: once the player releases the weapon, the next loading of the save will not cause the lock. And the "weapon swing in-progress" state transfers to other saved games if you press Esc and load a save while starting an attack (LMB is held, the weapon is behind the character).

#4 Updated by scrawl . 2 months ago

Similarly, if you hold down the attack key, switch to the inventory, release the key, and then close the inventory - the attack is not released (or at least it worked that way last time I tried). This is intended, because the player never explicitely released the attack (doing it while paused doesn't count). There's a (rejected, I think) report about that somewhere.

Persisting through a reload sounds like a bug though. Maybe we can clear input manager state in clear().

#5 Updated by Andrei Kortunov 2 months ago

  • Status changed from Feedback needed to Confirmed

Ok, I managed to reproduce this bug too, but only before 7f5f545.

Maybe we can clear input manager state in clear().

Looks like we keep a mAttackingOrSpell player flag between reloads. Maybe we should strictly reset this flag on savegame loading.
Which place would be better for this check? Player::clear() ?

#6 Updated by Andrei Kortunov 2 months ago

  • Operating system changed from Windows to Other

Ok, looks like resetting mAttackingOrSpell in Player::clear() works.

#7 Updated by Alexei Dobrohotov 2 months ago

  • Subject changed from Saving while swinging weapon in 1st person leads to glitches upon reload to Attacking flag isn't reset upon reloading
  • Category set to 8
  • Status changed from Confirmed to Resolved
  • Assignee set to Andrei Kortunov
  • Target version set to openmw-0.43
  • Reproducibility changed from Have not tried to Always

#8 Updated by Alexei Dobrohotov 2 months ago

  • Status changed from Resolved to Closed
  • % Done changed from 0 to 100

Also available in: Atom PDF