Merge pull request #162 from dimforge/determinism_after_snapshot

Fix determinism problem in the broad-phase after snapshot restoration.
This commit is contained in:
Sébastien Crozet
2021-04-02 16:47:47 +02:00
committed by GitHub

View File

@@ -55,8 +55,16 @@ impl SAPRegion {
} }
old.update_count = 0; old.update_count = 0;
if cfg!(feature = "enhanced-determinism") {
old.existing_proxies = BitVec::new();
} else {
old.existing_proxies.clear(); old.existing_proxies.clear();
}
old.id_in_parent_subregion = crate::INVALID_U32; old.id_in_parent_subregion = crate::INVALID_U32;
old.subregions.clear();
old.needs_update_after_subregion_removal = false;
// The rest of the fields should be "empty" // The rest of the fields should be "empty"
assert_eq!(old.subproper_proxy_count, 0); assert_eq!(old.subproper_proxy_count, 0);