summaryrefslogtreecommitdiff
path: root/main/main.cpp
diff options
context:
space:
mode:
authorAaron Franke <arnfranke@yahoo.com>2022-04-26 22:52:53 -0500
committerAaron Franke <arnfranke@yahoo.com>2022-04-26 22:53:50 -0500
commit0ae00a07d6db161fd0b6b2b91b08ef39757189c5 (patch)
tree8f613779f113ce27ca80f4abf88a85c51e9c3b15 /main/main.cpp
parent14caf9ee73e10ac857021538be356dbc84993411 (diff)
Rename variable names for some singletons
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