Closed kphoenix137 closed 1 week ago
Just curious, the other clients not burning RNG won't cause further desync issues? I'm guessing if the Phase result was going to be different, things are already desynced and it's not a concern, but just thinking out loud.
AFAIK the RNG state is never synced between clients
RNG is haphazardly synced via monster AI.
It's hard for me to say what impact the RNG sync actually has on reducing the frequency of desync. My guess would be.. very little impact, considering it doesn't account for latency at all.
RNG is haphazardly synced via monster AI.
It's hard for me to say what impact the RNG sync actually has on reducing the frequency of desync. My guess would be.. very little impact, considering it doesn't account for latency at all.
Color me wrong. Although hopefully this fix helps a little bit by not broadcasting the wrong destination for any amount of time for phasing.
Some basic testing reveals this PR doesn't resolve the desync.
Some basic testing reveals this PR doesn't resolve the desync.
That's a shame
Phasing relies on RNG to pick a destination. Since RNG state isn't properly synced between clients, this means that all clients run RNG to decide the Phasing location for any player, which can result in different outcomes, then the game needs to correct the position of the player who cast Phasing.
This fix removes the RNG calculation that occurs on each client when the spell executes. Instead of calculating the target position at this point in time, the caster calculates the position and sends the calculated target position with the packet information for casting the Phasing spell, with the new position syncing properly for all clients.