summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMikael Hermansson <mikael@hermansson.io>2023-01-17 14:04:19 +0100
committerMikael Hermansson <mikael@hermansson.io>2023-01-17 14:11:37 +0100
commitd10cd9961346e3d74316179bf21158f8a11c2f4a (patch)
treeb2436e7468335d56d64421441ad41b6e1c34b618
parentcaacade569eb7a541aaa7a8cdc3eedffca1422d9 (diff)
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;
}