More cleanup of maxclient stuff
This commit is contained in:
parent
3515402ccc
commit
49e92228e7
@ -216,9 +216,6 @@ namespace Components
|
||||
Utils::Hook::Set<char*>(0x4D3756, "sv_maxclients");
|
||||
Utils::Hook::Set<char*>(0x5E3772, "sv_maxclients");
|
||||
|
||||
// Set party_maxplayers to sv_maxclients
|
||||
//Utils::Hook::Set<char*>(0x4D5D64, "sv_maxclients");
|
||||
|
||||
// Unlatch maxclient dvars
|
||||
Utils::Hook::Xor<BYTE>(0x426187, Game::dvar_flag::DVAR_FLAG_LATCHED);
|
||||
Utils::Hook::Xor<BYTE>(0x4D374E, Game::dvar_flag::DVAR_FLAG_LATCHED);
|
||||
@ -227,22 +224,6 @@ namespace Components
|
||||
Utils::Hook::Xor<DWORD>(0x4D376D, Game::dvar_flag::DVAR_FLAG_LATCHED);
|
||||
Utils::Hook::Xor<DWORD>(0x5E3789, Game::dvar_flag::DVAR_FLAG_LATCHED);
|
||||
|
||||
Dvar::OnInit([] ()
|
||||
{
|
||||
Dvar::Register<int>("sv_maxclients", 18, 1, 18, Game::dvar_flag::DVAR_FLAG_SAVED, "The maximum number of clients that can connect to a server");
|
||||
//Dvar::Register<int>("party_maxplayers", 18, 0, 18, Game::dvar_flag::DVAR_FLAG_NONE, "Use sv_maxclients to adjust players!");
|
||||
//Dvar::Register<int>("ui_maxclients", 18, 0, 18, Game::dvar_flag::DVAR_FLAG_NONE, "Use sv_maxclients to adjust players!");
|
||||
});
|
||||
|
||||
// Synchronize maxplayers dvars
|
||||
/*QuickPatch::OnFrame([] ()
|
||||
{
|
||||
if (!Dvar::Var("party_enable").Get<bool>())
|
||||
{
|
||||
Dvar::Var("ui_maxclients").SetRaw(Dvar::Var("sv_maxclients").Get<int>());
|
||||
}
|
||||
});*/
|
||||
|
||||
Command::Add("connect", [] (Command::Params params)
|
||||
{
|
||||
if (params.Length() < 2)
|
||||
|
Loading…
Reference in New Issue
Block a user