fix compilation for feature enhanced-determinism (#739)
This commit is contained in:
@@ -231,7 +231,12 @@ impl BroadPhaseMultiSap {
|
||||
* Actually remove the colliders proxies.
|
||||
*/
|
||||
for removed in removed_colliders {
|
||||
if let Some(proxy_id) = self.colliders_proxy_ids.remove(removed) {
|
||||
#[cfg(feature = "enhanced-determinism")]
|
||||
let proxy_id = self.colliders_proxy_ids.swap_remove(removed);
|
||||
#[cfg(not(feature = "enhanced-determinism"))]
|
||||
let proxy_id = self.colliders_proxy_ids.remove(removed);
|
||||
|
||||
if let Some(proxy_id) = proxy_id {
|
||||
if proxy_id != crate::INVALID_U32 {
|
||||
self.proxies.remove(proxy_id);
|
||||
}
|
||||
|
||||
@@ -356,6 +356,9 @@ impl SAPLayer {
|
||||
|
||||
// Check if we can actually delete this region.
|
||||
if !region.contains_subproper_proxies() {
|
||||
#[cfg(feature = "enhanced-determinism")]
|
||||
let region_id = region_id.swap_remove();
|
||||
#[cfg(not(feature = "enhanced-determinism"))]
|
||||
let region_id = region_id.remove();
|
||||
|
||||
// We can delete this region. So we need to tell the larger
|
||||
|
||||
@@ -426,11 +426,17 @@ impl PhysicsPipeline {
|
||||
|
||||
// Apply some of delayed wake-ups.
|
||||
self.counters.stages.user_changes.start();
|
||||
for handle in impulse_joints
|
||||
#[cfg(feature = "enhanced-determinism")]
|
||||
let impulse_joints_iterator = impulse_joints
|
||||
.to_wake_up
|
||||
.drain(..)
|
||||
.chain(multibody_joints.to_wake_up.drain(..));
|
||||
#[cfg(not(feature = "enhanced-determinism"))]
|
||||
let impulse_joints_iterator = impulse_joints
|
||||
.to_wake_up
|
||||
.drain()
|
||||
.chain(multibody_joints.to_wake_up.drain())
|
||||
{
|
||||
.chain(multibody_joints.to_wake_up.drain());
|
||||
for handle in impulse_joints_iterator {
|
||||
islands.wake_up(bodies, handle.0, true);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user