[BUG][Player] Buttons are getting pushed opon loading replay

Started by IchoTolot, February 26, 2021, 10:01:50 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

IchoTolot

Weird bug with buttons and locked exits.

1.) Select a locked exit level (my R2 level from contest 22 works).
2.) When entering the level press pause while the screen is still black.
3.) Load a replay for the level and proceed.

--> All buttons are being pushed down and the exits open visually. Internally they are still locked and the level cannot be completed anymore --> buttons already pushed and exits are internally locked.

Example: https://www.youtube.com/watch?v=5db1Lp-Csoo 

Watch the section with my R2 level.

kaywhyn

Confirmed, as I can reproduce the bug by following the steps that Icho details in the bug report. The important thing is that there must be no frame advancement when the level loads in combination with pressing the pause hotkey while on the black screen. If you press pause while the screen is black, unpause after the level has loaded to allow some frame advancement, and then quickly pause the level again, then finally load the replay, there is no problem at all.

The level I noticed this happening has no entrance, but I have confirmed the bug happens in levels with entrances as well. Also, the bug happens with Icho's level in my video, but I have confirmed that it happens in the other R2 contest levels as well, and so the problem is not tied to the tileset. Finally, I have checked that this happens in v12.10.3, so this bug has been happening for several NL versions. Luckily, no replay breakages, but still something to report. Thanks, Icho, for doing so ;)
https://www.youtube.com/channel/UCPMqwuqZ206rBWJrUC6wkrA - My YouTube channel and you can also find my playlists of Lemmings level packs that I have LPed
kaywhyn's blog: https://www.lemmingsforums.net/index.php?topic=5363.0

namida

Fixed in commit 8ed91de. I can't figure out why it happens, but I was able to figure out what part of the code was causing it - the code for loading the saved states used by backwards frameskips. For some reason, pausing on frame 0 during the initial load (not after a reset / backwards skip) then loading a replay caused issues - but as it happens, in this situation there's no actual need to load the saved state in the first place, so I just made it not try to do so.
My projects
2D Lemmings: NeoLemmix (engine) | Lemmings Plus Series (level packs) | Doomsday Lemmings (level pack)
3D Lemmings: Loap (engine) | L3DEdit (level / graphics editor) | L3DUtils (replay / etc utility) | Lemmings Plus 3D (level pack)
Non-Lemmings: Commander Keen: Galaxy Reimagined (a Commander Keen fangame)