1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-12 13:20:55 +00:00

[Physics] Fix export with 3D disabled

This commit is contained in:
A Thousand Ships
2024-02-22 15:14:29 +01:00
parent 9c626b6236
commit f06222e487
4 changed files with 44 additions and 0 deletions

View File

@@ -60,7 +60,9 @@
#include "servers/display_server.h"
#include "servers/navigation_server_3d.h"
#include "servers/physics_server_2d.h"
#ifndef _3D_DISABLED
#include "servers/physics_server_3d.h"
#endif // _3D_DISABLED
#include "window.h"
#include <stdio.h>
#include <stdlib.h>
@@ -884,7 +886,9 @@ void SceneTree::set_pause(bool p_enabled) {
return;
}
paused = p_enabled;
#ifndef _3D_DISABLED
PhysicsServer3D::get_singleton()->set_active(!p_enabled);
#endif // _3D_DISABLED
PhysicsServer2D::get_singleton()->set_active(!p_enabled);
if (get_root()) {
get_root()->_propagate_pause_notification(p_enabled);