Optimize maxclients patch

This commit is contained in:
momo5502 2016-04-16 12:29:06 +02:00
parent 0b3c3154c9
commit 3515402ccc
2 changed files with 4 additions and 4 deletions

2
deps/protobuf vendored

@ -1 +1 @@
Subproject commit 814685ca2cd9280ca401e1842fd6311440921a0a
Subproject commit ca9bbd71d547a05604e8c2bddda66cdba5abe0c4

View File

@ -231,17 +231,17 @@ namespace Components
{
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!");
//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([] ()
/*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)
{