-
-
Notifications
You must be signed in to change notification settings - Fork 14
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
Adding nodes with a RollbackSynchronizer causes resimulation from tick -1 #175
Labels
Comments
elementbound
added
bug
Something isn't working
good first issue
Good for newcomers
labels
Dec 21, 2023
Good catch, ideally new nodes should start their history from their spawn tick. Thanks for providing a workaround as well! It's pretty sensible at first glance, but I'll look into it further. |
Hey @Noobsaure, just pushed #204. Looks good from my testing, would you mind validating as well? Just swap RollbackSynchronizer with the new version. |
elementbound
added a commit
that referenced
this issue
Feb 21, 2024
Merged PR, but feel free to chime in with updates! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I encountered this issue while implementing periodic spawns of rollback-aware NPCs : each new
RollbackSynchronizer
still has a_latest_state
set to -1 by the time_before_loop
is first called, causing the_resim_from
variable to be -1 for the corresponding_rollback
call and thus resimulating everything from the start of the game (or history size, I didn't check, but it was tanking my FPS hard).I worked around this by adding a
_record_initial_tick
function and calling it fromprocess_settings
as follows:It's more of a hack at this point but it works. I would be interested if there were a preferred solution to this.
The text was updated successfully, but these errors were encountered: