-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Add #7726: Shortcut to advance one tick #7851
Conversation
Out of curiosity, can't you unset the paused state while advancing a single update? |
Because I only thought about that after submitting this PR. Would indeed be the best solution. |
If the purpose of the single frame step is to debug things then the game should not sit in the paused state as that might change some logic that would normally execute when the game isn't paused, we can already debug a paused state. I think that its important when single stepping frames the pause flag should be unset. |
I've taken the liberty to rebase this PR and fix an issue where the sounds keep playing when you progress one frame. Everything looks good to me now. |
I found something that needs to be fixed first, the title screen freezes when you go back to it (may be casued by me). Steps to reproduce:
After one frame, the title screen will be paused too. |
I’ve somehow managed to get the title screen in pause mode on the develop build as well, so I’ll investigate both. Problem might be that some things change the paused state, which gets undone by this code. I’ll at least get a more robust solution for that. |
The game is now only re-paused when this feature caused the game to get into an unpaused state. That should fix most (if not all) issues related to (un)pausing the game elsewhere (most notably, going to the title screen). |
Tapping the shortcut advances the game by exactly one tick. Shortcut is disabled by default and does not work in multiplayer.
Tapping the shortcut advances the game by exactly one tick. Shortcut is disabled by default and does not work in multiplayer.
Some animations don't update because they rely on game_is_paused() to return true in their update function. Repeatedly tapping (or tap+hold) clearly shows this when a train passes through an on-ride photo section or a door. A search through the code shows that only map animations and twitch may be affected by the game advancing while in paused mode.Fixed, the game temporarily unpauses when advancing one frame.