summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2023-01-18 08:35:52 +0100
committerRémi Verschelde <rverschelde@gmail.com>2023-01-18 08:35:52 +0100
commit40c017f9c0baf6dff8d06f93eb62ae3cd5106765 (patch)
tree204031404af95a023a19083174ea46109d7b0907
parent6da836bbb4541ed82faa63da9744878c691ceff3 (diff)
parentd10cd9961346e3d74316179bf21158f8a11c2f4a (diff)
Merge pull request #71557 from mihe/physics-end-sync
Make physics servers `end_sync` on exit
-rw-r--r--main/main.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/main/main.cpp b/main/main.cpp
index 7ba5ffab2a..00c6b1fecd 100644
--- a/main/main.cpp
+++ b/main/main.cpp
@@ -3030,6 +3030,9 @@ bool Main::iteration() {
PhysicsServer2D::get_singleton()->flush_queries();
if (OS::get_singleton()->get_main_loop()->physics_process(physics_step * time_scale)) {
+ PhysicsServer3D::get_singleton()->end_sync();
+ PhysicsServer2D::get_singleton()->end_sync();
+
exit = true;
break;
}