summaryrefslogtreecommitdiff
path: root/modules/bullet/bullet_physics_server.cpp
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2020-07-10 08:48:29 +0200
committerGitHub <noreply@github.com>2020-07-10 08:48:29 +0200
commitfb664c61f541e2ff2a2be2f55c2ba1d802d334be (patch)
tree41e2776fd334324a1acd0940cdbadf0df4f7c7df /modules/bullet/bullet_physics_server.cpp
parent0fa165f0c936411a775bb41f362da394074b797f (diff)
parentf31b2a1bba7d82be5054c680cd910690622e95a7 (diff)
Merge pull request #40184 from madmiraal/fix-37702
Move Bullet physics query flush from Bullet space pre-tick callback to Bullet physics flush_queries()
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() {