[Dedicated] Add 'unused' dedicated server code cause it's actually used
Removing it breaks the ZoneBuilder @TheApadayo!
This commit is contained in:
parent
280830274c
commit
20b8c1cec4
@ -297,7 +297,7 @@ namespace Components
|
||||
Dvar::Register<bool>("sv_dontrotate", false, Game::dvar_flag::DVAR_FLAG_CHEAT, "");
|
||||
Dvar::Register<bool>("com_logFilter", true, Game::dvar_flag::DVAR_FLAG_LATCHED, "Removes ~95% of unneeded lines from the log");
|
||||
|
||||
if (Dedicated::IsEnabled())
|
||||
if (Dedicated::IsEnabled() || ZoneBuilder::IsEnabled())
|
||||
{
|
||||
// Make sure all callbacks are handled
|
||||
Scheduler::OnFrame(Steam::SteamAPI_RunCallbacks);
|
||||
@ -379,6 +379,8 @@ namespace Components
|
||||
Utils::Hook(0x62737D, Dedicated::TimeWrapStub, HOOK_CALL).install()->quick();
|
||||
//Utils::Hook::Set<DWORD>(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();
|
||||
|
||||
@ -398,7 +400,7 @@ namespace Components
|
||||
#ifdef USE_LEGACY_SERVER_LIST
|
||||
// Heartbeats
|
||||
Scheduler::Once(Dedicated::Heartbeat);
|
||||
Scheduler::OnFrame([] ()
|
||||
Scheduler::OnFrame([]()
|
||||
{
|
||||
static Utils::Time::Interval interval;
|
||||
|
||||
@ -410,13 +412,13 @@ namespace Components
|
||||
});
|
||||
#endif
|
||||
|
||||
Dvar::OnInit([] ()
|
||||
Dvar::OnInit([]()
|
||||
{
|
||||
Dvar::Register<const char*>("sv_sayName", "^7Console", Game::dvar_flag::DVAR_FLAG_NONE, "The name to pose as for 'say' commands");
|
||||
Dvar::Register<const char*>("sv_motd", "", Game::dvar_flag::DVAR_FLAG_NONE, "A custom message of the day for servers");
|
||||
|
||||
// Say command
|
||||
Command::AddSV("say", [] (Command::Params* params)
|
||||
Command::AddSV("say", [](Command::Params* params)
|
||||
{
|
||||
if (params->length() < 2) return;
|
||||
|
||||
@ -436,7 +438,7 @@ namespace Components
|
||||
});
|
||||
|
||||
// Tell command
|
||||
Command::AddSV("tell", [] (Command::Params* params)
|
||||
Command::AddSV("tell", [](Command::Params* params)
|
||||
{
|
||||
if (params->length() < 3) return;
|
||||
|
||||
@ -457,7 +459,7 @@ namespace Components
|
||||
});
|
||||
|
||||
// Sayraw command
|
||||
Command::AddSV("sayraw", [] (Command::Params* params)
|
||||
Command::AddSV("sayraw", [](Command::Params* params)
|
||||
{
|
||||
if (params->length() < 2) return;
|
||||
|
||||
@ -467,7 +469,7 @@ namespace Components
|
||||
});
|
||||
|
||||
// Tellraw command
|
||||
Command::AddSV("tellraw", [] (Command::Params* params)
|
||||
Command::AddSV("tellraw", [](Command::Params* params)
|
||||
{
|
||||
if (params->length() < 3) return;
|
||||
|
||||
@ -478,7 +480,7 @@ namespace Components
|
||||
});
|
||||
|
||||
// ! command
|
||||
Command::AddSV("!", [] (Command::Params* params)
|
||||
Command::AddSV("!", [](Command::Params* params)
|
||||
{
|
||||
if (params->length() != 2) return;
|
||||
|
||||
@ -498,6 +500,7 @@ namespace Components
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
for(int i = 0; i < ARRAYSIZE(Dedicated::PlayerGuids); ++i)
|
||||
|
Loading…
x
Reference in New Issue
Block a user