-
Notifications
You must be signed in to change notification settings - Fork 133
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Move to any previous level by using IDCLEV #1109
Conversation
Next commit will introduce another operator: "demogotoidclev", and since there are more than one operator, it might be a good idea to make them global, i.e. not hide in depths of g_game.c.
As it's "id-change-level".
Some investigations regarding pistol appearing:
Perhaps, it's not that critical, but I really don't want to leave it as is. Not sure where to dig next, though. 🤔 |
Still no luck. I don't understand where the pistol comes from, it can't be playstate desync, but what is it then? Drawing first frame of demo while screen is keeping last one? Dead end. On top of that, I have tried to double-check by brute-force approach, i.e. by disabling screen wipe in the code and holding "Restart Level" button. And looks likes there is memory leak, have a look at growing amount of memory consumed by crispy-doom.exe. Somewhere near ~550 MB it's silently crashes: https://youtu.be/9n_3xBYqYSg Oddly, I don't have this leak in ID, despite most of the code is identical. This probably a different topic for investigation already. How should we proceed then? Technically, this PR is working and ready for review, but turns out, there are two underlying problems beneath it. |
Strange, I cannot reproduce this. Not the pistol sprite before the wipe and also not the memory leaking. 🤷 |
Please try to enable uncapped framerate and disable vsync to get as much fps as possible (~1350 fps in my case). Pistol is not appearing in original capped framerate, and appears extremely rare in uncapped/vsync (165 fps in my case). |
We made deeper investigation with @rfomin yesterday. What is clear now:
So, in terms of this PR everything seems to be done. My initial idea of keeping original Crispy |
This simple trick allows to warp to any previous level by using IDCLEV cheat code. Technically, it's just restarts whole demo if "demowarp" map is below or equals current map. Unfortunately, there is no other way to do this more faster way, since demo is just a record of player inputs, there are no indicators or markers like "here's user exiting the level" or "there's loaded next one".
I've also moved
demogotonextlvl
to Crispy-> structure: there two special operators now, no need to hide them in depth ofg_game.c
. Could be useful for future.It is working fine, except... While testing I have noticed one strange bug with PSPR weapon: https://www.youtube.com/watch?v=w_qTIR6LpKs. Happens on 00:15, for some reason pistol appears right before wipe effect, in very odd position.