diff options
author | A Thousand Ships <96648715+AThousandShips@users.noreply.github.com> | 2024-02-22 15:14:29 +0100 |
---|---|---|
committer | A Thousand Ships <96648715+AThousandShips@users.noreply.github.com> | 2024-02-22 16:23:48 +0100 |
commit | f06222e487355749ca9d10f9a00342481ffd5c4c (patch) | |
tree | a03b342f14d8691e9845bb418268cc2bc4ac82ef /tests | |
parent | 9c626b623619d89ce3e02a8422a4de977e016d1b (diff) | |
download | redot-engine-f06222e487355749ca9d10f9a00342481ffd5c4c.tar.gz |
[Physics] Fix export with 3D disabled
Diffstat (limited to 'tests')
-rw-r--r-- | tests/test_main.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/test_main.cpp b/tests/test_main.cpp index bac5c3dd7c..47c8e9732d 100644 --- a/tests/test_main.cpp +++ b/tests/test_main.cpp @@ -144,7 +144,9 @@ #include "servers/navigation_server_2d.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 "servers/rendering/rendering_server_default.h" int test_main(int argc, char *argv[]) { @@ -219,7 +221,9 @@ struct GodotTestCaseListener : public doctest::IReporter { SignalWatcher *signal_watcher = nullptr; +#ifndef _3D_DISABLED PhysicsServer3D *physics_server_3d = nullptr; +#endif // _3D_DISABLED PhysicsServer2D *physics_server_2d = nullptr; NavigationServer3D *navigation_server_3d = nullptr; NavigationServer2D *navigation_server_2d = nullptr; @@ -254,8 +258,10 @@ struct GodotTestCaseListener : public doctest::IReporter { ThemeDB::get_singleton()->finalize_theme(); ThemeDB::get_singleton()->initialize_theme_noproject(); +#ifndef _3D_DISABLED physics_server_3d = PhysicsServer3DManager::get_singleton()->new_default_server(); physics_server_3d->init(); +#endif // _3D_DISABLED physics_server_2d = PhysicsServer2DManager::get_singleton()->new_default_server(); physics_server_2d->init(); @@ -334,11 +340,13 @@ struct GodotTestCaseListener : public doctest::IReporter { navigation_server_2d = nullptr; } +#ifndef _3D_DISABLED if (physics_server_3d) { physics_server_3d->finish(); memdelete(physics_server_3d); physics_server_3d = nullptr; } +#endif // _3D_DISABLED if (physics_server_2d) { physics_server_2d->finish(); |