fix: RewindableAction to handle later ticks#534
Merged
elementbound merged 3 commits intomainfrom Nov 21, 2025
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
When modifying a rewindable action from outside of its parent, it may set a tick in one loop, but not in the next one. For example, the player hits a spike, and the spike sets the RewindableAction for tick 15. On the next loop, the player doesn't hit the spike on tick 15, but is also not simulated for tick 15 since it doesn't have input.
This results in TicksetSerializer's assert failing, because there's an active tick past the last set one.
Instead, RewindableAction now serializes the last set tick, even if it was not set in the current loop. TicksetSerializer will not serialize ticks outside of the specified range.
Fixes #532