From 498359325f49397d1dbb3c0c8951d9fda44b97f2 Mon Sep 17 00:00:00 2001 From: TheApadayo Date: Wed, 7 Jun 2017 15:08:04 -0400 Subject: [PATCH] [Zonebuilder] Remove unused dedicated server code --- src/Components/Modules/Dedicated.cpp | 28 +++++++++++++--------------- 1 file changed, 13 insertions(+), 15 deletions(-) diff --git a/src/Components/Modules/Dedicated.cpp b/src/Components/Modules/Dedicated.cpp index 25232a46..e8b2a795 100644 --- a/src/Components/Modules/Dedicated.cpp +++ b/src/Components/Modules/Dedicated.cpp @@ -297,7 +297,7 @@ namespace Components Dvar::Register("sv_dontrotate", false, Game::dvar_flag::DVAR_FLAG_CHEAT, ""); Dvar::Register("com_logFilter", true, Game::dvar_flag::DVAR_FLAG_LATCHED, "Removes ~95% of unneeded lines from the log"); - if (Dedicated::IsEnabled() || ZoneBuilder::IsEnabled()) // Run zonebuilder as dedi :P + if (Dedicated::IsEnabled()) { // Make sure all callbacks are handled Scheduler::OnFrame(Steam::SteamAPI_RunCallbacks); @@ -379,23 +379,21 @@ namespace Components Utils::Hook(0x62737D, Dedicated::TimeWrapStub, HOOK_CALL).install()->quick(); //Utils::Hook::Set(0x62735C, 50'000); // Time wrap after 50 seconds (for testing - i don't want to wait 3 weeks) - if (!ZoneBuilder::IsEnabled()) + // Post initialization point + Utils::Hook(0x60BFBF, Dedicated::PostInitializationStub, HOOK_JUMP).install()->quick(); + + // Transmit custom data + Scheduler::OnFrame([]() { - // Post initialization point - Utils::Hook(0x60BFBF, Dedicated::PostInitializationStub, HOOK_JUMP).install()->quick(); - - // Transmit custom data - Scheduler::OnFrame([]() + static Utils::Time::Interval interval; + if (interval.elapsed(10s)) { - static Utils::Time::Interval interval; - if (interval.elapsed(10s)) - { - interval.update(); + interval.update(); - CardTitles::SendCustomTitlesToClients(); - //Clantags::SendClantagsToClients(); - } - }); + CardTitles::SendCustomTitlesToClients(); + //Clantags::SendClantagsToClients(); + } + }); #ifdef USE_LEGACY_SERVER_LIST // Heartbeats