Recorded demos desynced as wrong weapons are used under some circumstances
Recorded demos don't respect any weapon changes player makes, so e.g. if RPG is used to fire from, demo still uses pistol and thus get desynced quickly.
I tried different combinations of circumstances under which this would happen and the result is this (every line is a new clean launch of jfduke3d):
- recording demo without any other demo running on background - recorded demo bad
- recording demo WITH the previously recorded 'bad' demo running in background - recorded demo bad agian
- start a new game from menu, then quit to menu, enable demo recording and record a demo - recorded demo is OK and respects weapon changes
- recording demo WITH the previously recorded OK demo running in background without having to start a new game - recorded demo OK again
- recording demo from cli with warping to a map - recorded demo bad
Tested on Mageia 9 (gcc 12.3) and the provided Windows x64 build which behaves exactly the same in this regard (in Wine 9.17). Interesting to note is that the Linux version also has a SIGBART on exit whenever demo is recorded, whether the resulting demo is 'ok' or not. I don't know if I have some specific settings that can cause that, but the only thing I can think of is 'user_profiles_disabled' file is used with both - the built Linux and Windows versions, no addons used for the demos.
Attached in the zip are two 'bad' demos - one from Linux and one from Win64 version (which was run via Wine)
I forgot to mention that in both of these demos, two weapon shots after the jump in front of the camera are supposed to be from the picked-up RPG, but the weapon used is still pistol in the demos.
Also, the Linux version uses polymost and the Windows version uses software renderer, so there is probably no connection regarding used renderer.