Fix determinism problem in the broad-phase after snapshot restoration.

This commit is contained in:
Crozet Sébastien
2021-04-02 16:23:20 +02:00
parent 4a0b390f9b
commit d9d89afb6e

View File

@@ -55,8 +55,16 @@ impl SAPRegion {
}
old.update_count = 0;
old.existing_proxies.clear();
if cfg!(feature = "enhanced-determinism") {
old.existing_proxies = BitVec::new();
} else {
old.existing_proxies.clear();
}
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"
assert_eq!(old.subproper_proxy_count, 0);