summaryrefslogtreecommitdiff
path: root/main/main.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'main/main.cpp')
-rw-r--r--main/main.cpp50
1 files changed, 25 insertions, 25 deletions
diff --git a/main/main.cpp b/main/main.cpp
index f20ec94fa5..755924929c 100644
--- a/main/main.cpp
+++ b/main/main.cpp
@@ -120,10 +120,10 @@ static RenderingServer *rendering_server = nullptr;
static CameraServer *camera_server = nullptr;
static XRServer *xr_server = nullptr;
static TextServerManager *tsman = nullptr;
-static PhysicsServer3D *physics_server = nullptr;
-static PhysicsServer2D *physics_2d_server = nullptr;
-static NavigationServer3D *navigation_server = nullptr;
-static NavigationServer2D *navigation_2d_server = nullptr;
+static PhysicsServer3D *physics_server_3d = nullptr;
+static PhysicsServer2D *physics_server_2d = nullptr;
+static NavigationServer3D *navigation_server_3d = nullptr;
+static NavigationServer2D *navigation_server_2d = nullptr;
// We error out if setup2() doesn't turn this true
static bool _start_success = false;
@@ -204,32 +204,32 @@ static String get_full_version_string() {
// to have less code in main.cpp.
void initialize_physics() {
/// 3D Physics Server
- physics_server = PhysicsServer3DManager::new_server(
+ physics_server_3d = PhysicsServer3DManager::new_server(
ProjectSettings::get_singleton()->get(PhysicsServer3DManager::setting_property_name));
- if (!physics_server) {
+ if (!physics_server_3d) {
// Physics server not found, Use the default physics
- physics_server = PhysicsServer3DManager::new_default_server();
+ physics_server_3d = PhysicsServer3DManager::new_default_server();
}
- ERR_FAIL_COND(!physics_server);
- physics_server->init();
+ ERR_FAIL_COND(!physics_server_3d);
+ physics_server_3d->init();
/// 2D Physics server
- physics_2d_server = PhysicsServer2DManager::new_server(
+ physics_server_2d = PhysicsServer2DManager::new_server(
ProjectSettings::get_singleton()->get(PhysicsServer2DManager::setting_property_name));
- if (!physics_2d_server) {
+ if (!physics_server_2d) {
// Physics server not found, Use the default physics
- physics_2d_server = PhysicsServer2DManager::new_default_server();
+ physics_server_2d = PhysicsServer2DManager::new_default_server();
}
- ERR_FAIL_COND(!physics_2d_server);
- physics_2d_server->init();
+ ERR_FAIL_COND(!physics_server_2d);
+ physics_server_2d->init();
}
void finalize_physics() {
- physics_server->finish();
- memdelete(physics_server);
+ physics_server_3d->finish();
+ memdelete(physics_server_3d);
- physics_2d_server->finish();
- memdelete(physics_2d_server);
+ physics_server_2d->finish();
+ memdelete(physics_server_2d);
}
void finalize_display() {
@@ -240,18 +240,18 @@ void finalize_display() {
}
void initialize_navigation_server() {
- ERR_FAIL_COND(navigation_server != nullptr);
+ ERR_FAIL_COND(navigation_server_3d != nullptr);
- navigation_server = NavigationServer3DManager::new_default_server();
- navigation_2d_server = memnew(NavigationServer2D);
+ navigation_server_3d = NavigationServer3DManager::new_default_server();
+ navigation_server_2d = memnew(NavigationServer2D);
}
void finalize_navigation_server() {
- memdelete(navigation_server);
- navigation_server = nullptr;
+ memdelete(navigation_server_3d);
+ navigation_server_3d = nullptr;
- memdelete(navigation_2d_server);
- navigation_2d_server = nullptr;
+ memdelete(navigation_server_2d);
+ navigation_server_2d = nullptr;
}
//#define DEBUG_INIT