From 32b02d9b9298d3dda747953e3e31a0b7c89e6650 Mon Sep 17 00:00:00 2001 From: Skull Merlin <86374920+skkuull@users.noreply.github.com> Date: Fri, 20 May 2022 23:36:52 +0300 Subject: [PATCH] dedi info + remove shaders component The shaders are working and populating on 1.15 so no need to disable them. --- src/client/component/dedicated_info.cpp | 7 ++-- src/client/component/shaders.cpp | 51 ------------------------- 2 files changed, 3 insertions(+), 55 deletions(-) delete mode 100644 src/client/component/shaders.cpp diff --git a/src/client/component/dedicated_info.cpp b/src/client/component/dedicated_info.cpp index 65aa148e..f2b02b8b 100644 --- a/src/client/component/dedicated_info.cpp +++ b/src/client/component/dedicated_info.cpp @@ -1,5 +1,4 @@ #include -#include "console.hpp" #include "loader/component_loader.hpp" #include "game/game.hpp" #include "scheduler.hpp" @@ -22,7 +21,7 @@ namespace dedicated_info auto* sv_running = game::Dvar_FindVar("sv_running"); if (!sv_running || !sv_running->current.enabled) { - console::set_title("H1-Mod Dedicated Server"); + SetConsoleTitle("H1-Mod Dedicated Server"); return; } @@ -54,7 +53,7 @@ namespace dedicated_info utils::string::strip(sv_hostname->current.string, cleaned_hostname.data(), static_cast(strlen(sv_hostname->current.string)) + 1); - console::set_title(utils::string::va("%s on %s [%d/%d] (%d)", cleaned_hostname.data(), + SetConsoleTitle(utils::string::va("%s on %s [%d/%d] (%d)", cleaned_hostname.data(), mapname->current.string, client_count, sv_maxclients->current.integer, bot_count)); }, scheduler::pipeline::main, 1s); @@ -62,4 +61,4 @@ namespace dedicated_info }; } -//REGISTER_COMPONENT(dedicated_info::component) \ No newline at end of file +REGISTER_COMPONENT(dedicated_info::component) \ No newline at end of file diff --git a/src/client/component/shaders.cpp b/src/client/component/shaders.cpp deleted file mode 100644 index 60d74ddc..00000000 --- a/src/client/component/shaders.cpp +++ /dev/null @@ -1,51 +0,0 @@ -#include -#include "loader/component_loader.hpp" - -#include "scheduler.hpp" -#include "dvars.hpp" - -#include "game/game.hpp" -#include "game/dvars.hpp" - -#include -#include -#include - -namespace shaders -{ - namespace - { - game::dvar_t* disable_shader_caching = nullptr; - - bool shader_should_show_dialog_stub() - { - return !disable_shader_caching->current.enabled; - } - } - - class component final : public component_interface - { - public: - void post_unpack() override - { - if (!game::environment::is_mp()) - { - return; - } - - const auto has_flag = utils::flags::has_flag("noshadercaching"); - - disable_shader_caching = dvars::register_bool("disable_shader_caching", has_flag, - game::DVAR_FLAG_SAVED, "Disable shader caching"); - if (has_flag) - { - dvars::override::set_bool("disable_shader_caching", 1); - dvars::override::set_from_string("disable_shader_caching", "1"); - } - - utils::hook::jump(0x14007E710, shader_should_show_dialog_stub); - } - }; -} - -//REGISTER_COMPONENT(shaders::component)