From 0c58f5dedbfaf9d574b2f007db633279ee88e2f1 Mon Sep 17 00:00:00 2001 From: tritonas00 Date: Sun, 11 Apr 2021 11:46:00 +0300 Subject: [PATCH] removed diag_physics_dt --- source/main/Application.cpp | 1 - source/main/Application.h | 1 - source/main/gui/panels/GUI_TopMenubar.cpp | 8 -------- source/main/physics/ActorManager.h | 2 +- source/main/system/CVar.cpp | 1 - 5 files changed, 1 insertion(+), 12 deletions(-) diff --git a/source/main/Application.cpp b/source/main/Application.cpp index 5abc61f793..f2396cfe32 100644 --- a/source/main/Application.cpp +++ b/source/main/Application.cpp @@ -144,7 +144,6 @@ CVar* diag_hide_beam_stress; CVar* diag_hide_wheel_info; CVar* diag_hide_wheels; CVar* diag_hide_nodes; -CVar* diag_physics_dt; CVar* diag_terrn_log_roads; // System diff --git a/source/main/Application.h b/source/main/Application.h index 24bf6d68c6..3a9a1dd3bf 100644 --- a/source/main/Application.h +++ b/source/main/Application.h @@ -317,7 +317,6 @@ extern CVar* diag_hide_beam_stress; extern CVar* diag_hide_wheel_info; extern CVar* diag_hide_wheels; extern CVar* diag_hide_nodes; -extern CVar* diag_physics_dt; extern CVar* diag_terrn_log_roads; // System diff --git a/source/main/gui/panels/GUI_TopMenubar.cpp b/source/main/gui/panels/GUI_TopMenubar.cpp index 372ed77077..b99c59f090 100644 --- a/source/main/gui/panels/GUI_TopMenubar.cpp +++ b/source/main/gui/panels/GUI_TopMenubar.cpp @@ -410,14 +410,6 @@ void TopMenubar::Update() } DrawGIntSlider(App::gfx_fps_limit, _LC("TopMenubar", "Game"), 0, 240); - /* // Uncomment if you want to tweak the physics, it has no other use, really. - // Do not publish - players tend to max it out and then complain about performance. :| - int physics_fps = std::round(1.0f / App::diag_physics_dt->GetFloat()); - if (ImGui::SliderInt("Physics", &physics_fps, 2000, 10000)) - { - App::diag_physics_dt->SetVal(Ogre::Math::Clamp(1.0f / physics_fps, 0.0001f, 0.0005f)); - } - */ ImGui::Separator(); ImGui::TextColored(GRAY_HINT_TEXT, _LC("TopMenubar", "Simulation:")); float slowmotion = std::min(App::GetGameContext()->GetActorManager()->GetSimulationSpeed(), 1.0f); diff --git a/source/main/physics/ActorManager.h b/source/main/physics/ActorManager.h index 4ab05a1552..39937e44fd 100644 --- a/source/main/physics/ActorManager.h +++ b/source/main/physics/ActorManager.h @@ -35,7 +35,7 @@ #include #include -#define PHYSICS_DT App::diag_physics_dt->GetFloat() +#define PHYSICS_DT 0.0005f // fixed dt of 0.5 ms namespace RoR { diff --git a/source/main/system/CVar.cpp b/source/main/system/CVar.cpp index 3d2f95d2b4..2461faac76 100644 --- a/source/main/system/CVar.cpp +++ b/source/main/system/CVar.cpp @@ -94,7 +94,6 @@ void Console::CVarSetupBuiltins() App::diag_hide_wheel_info = this->CVarCreate("diag_hide_wheel_info", "Hide wheel info", CVAR_ARCHIVE | CVAR_TYPE_BOOL, "true"); App::diag_hide_wheels = this->CVarCreate("diag_hide_wheels", "Hide wheels", CVAR_ARCHIVE | CVAR_TYPE_BOOL, "false"); App::diag_hide_nodes = this->CVarCreate("diag_hide_nodes", "Hide nodes", CVAR_ARCHIVE | CVAR_TYPE_BOOL, "false"); - App::diag_physics_dt = this->CVarCreate("diag_physics_dt", "PhysicsTimeStep", CVAR_ARCHIVE | CVAR_TYPE_FLOAT, "0.0005"); App::diag_terrn_log_roads = this->CVarCreate("diag_terrn_log_roads", "", CVAR_ARCHIVE | CVAR_TYPE_BOOL, "false"); App::sys_process_dir = this->CVarCreate("sys_process_dir", "", 0);