aboutsummaryrefslogtreecommitdiff
path: root/src/pipeline
diff options
context:
space:
mode:
authorThierry Berger <contact@thierryberger.com>2024-09-23 18:15:29 +0200
committerGitHub <noreply@github.com>2024-09-23 18:15:29 +0200
commit9e1113c5c7e3c3a042bc5979c158e752acfeb46a (patch)
treef5d41dce0ba5fa6f83d5e1fcde331a2294229e5d /src/pipeline
parent76357e3588dfc5efe9fa609df21e2aaf707fbba9 (diff)
downloadrapier-9e1113c5c7e3c3a042bc5979c158e752acfeb46a.tar.gz
rapier-9e1113c5c7e3c3a042bc5979c158e752acfeb46a.tar.bz2
rapier-9e1113c5c7e3c3a042bc5979c158e752acfeb46a.zip
fix compilation for feature enhanced-determinism (#739)
Diffstat (limited to 'src/pipeline')
-rw-r--r--src/pipeline/physics_pipeline.rs12
1 files changed, 9 insertions, 3 deletions
diff --git a/src/pipeline/physics_pipeline.rs b/src/pipeline/physics_pipeline.rs
index ab4b119..8505618 100644
--- a/src/pipeline/physics_pipeline.rs
+++ b/src/pipeline/physics_pipeline.rs
@@ -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);
}