gschup/bevy_ggrs

Sessions `.with_desync_detection(DesyncDetection::On)` always reports false positives

johanhelsing opened this issue · 1 comments

Describe the bug

Check out the branch in #48 , which enables desync detection in the p2p example. As soon as it starts, it reports a desync.

Expected behavior
It should not report a desync (since it doesn't desync. only the hash is different)

Desktop (please complete the following information):

  • Linux

Additional context
This happens because bevy_reflect uses ahash::AHasher::default. Since bevy uses ahasher with the default features, this means it's seeded at runtime, which means hashes will always be different across peers, see: https://docs.rs/ahash/latest/ahash/struct.AHasher.html#method.default

Submitted a PR to bevy: bevyengine/bevy#7583