Attacking flag isn't reset upon reloading
To reproduce, do not click the 'attack' button after reloading.
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:
#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).
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() ?
#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