fix: Queue RewindableAction mutations ahead of rollback loop#531
Conversation
The problem: - rewindable action was spamming about mutations that happened early and the tick processing was trying to process a mutation for tick 15 continuously after the netfox instance began. - this meant that when sending inputs with rewindable actions the tick was never aligned even on the host to run the mutation for the rewindable action. - we had a lot of spam from the debugger that rewindable action tick was incorrect. The solution in this PR (it may not be correct or perfect) but it does fix the samples and my own project and most importantly forest brawler now works properly.
|
I recommend this is tested with all samples first before merge by someone independent of me. |
|
Did some investigations, this seems to be two issues. First, the RewindableAction queued its mutations in Moved this part into In addition, RewindableAction also logged warnings about receiving ticks into the future. From my experiments, this happens only under extremely low latency, most probably in cases where the server time runs ahead of the client. Gave the warning a few ticks of leeway. |
The problem:
The solution in this PR (it may not be correct or perfect) but it does fix the samples and my own project and most importantly forest brawler now works properly.
More details:
I added some debug logic to the error that was spamming this might explain what is going on more for those who are familiar with the code:

[WRN][@271][#1][A@270|270>271][netfox::NetworkRollback] Trying to mutate object player #1:<CharacterBody3D#152622335660> in the past, for tick 15! p_tick(15) < tick(270)