summaryrefslogtreecommitdiff
path: root/modules/bullet/bullet_physics_server.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'modules/bullet/bullet_physics_server.cpp')
-rw-r--r--modules/bullet/bullet_physics_server.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/modules/bullet/bullet_physics_server.cpp b/modules/bullet/bullet_physics_server.cpp
index bb1678a994..8f64c11867 100644
--- a/modules/bullet/bullet_physics_server.cpp
+++ b/modules/bullet/bullet_physics_server.cpp
@@ -1557,6 +1557,13 @@ void BulletPhysicsServer3D::sync() {
}
void BulletPhysicsServer3D::flush_queries() {
+ if (!active) {
+ return;
+ }
+
+ for (int i = 0; i < active_spaces_count; ++i) {
+ active_spaces[i]->flush_queries();
+ }
}
void BulletPhysicsServer3D::finish() {