Explorar o código

Merge pull request #71557 from mihe/physics-end-sync

Make physics servers `end_sync` on exit
Rémi Verschelde %!s(int64=2) %!d(string=hai) anos
pai
achega
40c017f9c0
Modificáronse 1 ficheiros con 3 adicións e 0 borrados
  1. 3 0
      main/main.cpp

+ 3 - 0
main/main.cpp

@@ -3030,6 +3030,9 @@ bool Main::iteration() {
 		PhysicsServer2D::get_singleton()->flush_queries();
 		PhysicsServer2D::get_singleton()->flush_queries();
 
 
 		if (OS::get_singleton()->get_main_loop()->physics_process(physics_step * time_scale)) {
 		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;
 			exit = true;
 			break;
 			break;
 		}
 		}