[Party] Correctly parse max players

This commit is contained in:
momo5502 2017-02-25 00:52:11 +01:00
parent 0fcf3ea014
commit fe126a4308
3 changed files with 6 additions and 6 deletions

View File

@ -66,8 +66,8 @@ namespace Components
} }
else else
{ {
//maxclientCount = Dvar::Var("sv_maxclients").get<int>(); maxclientCount = Dvar::Var("party_maxplayers").get<int>();
maxclientCount = Game::Party_GetMaxPlayers(*Game::partyIngame); //maxclientCount = Game::Party_GetMaxPlayers(*Game::partyIngame);
clientCount = Game::PartyHost_CountMembers(reinterpret_cast<Game::PartyData_s*>(0x1081C00)); clientCount = Game::PartyHost_CountMembers(reinterpret_cast<Game::PartyData_s*>(0x1081C00));
} }

View File

@ -302,8 +302,8 @@ namespace Components
} }
else else
{ {
//maxclientCount = Dvar::Var("sv_maxclients").get<int>(); maxclientCount = Dvar::Var("party_maxplayers").get<int>();
maxclientCount = Game::Party_GetMaxPlayers(*Game::partyIngame); //maxclientCount = Game::Party_GetMaxPlayers(*Game::partyIngame);
clientCount = Game::PartyHost_CountMembers(reinterpret_cast<Game::PartyData_s*>(0x1081C00)); clientCount = Game::PartyHost_CountMembers(reinterpret_cast<Game::PartyData_s*>(0x1081C00));
} }

View File

@ -116,8 +116,8 @@ namespace Components
if (!maxclientCount) if (!maxclientCount)
{ {
//maxclientCount = Dvar::Var("sv_maxclients").get<int>(); maxclientCount = Dvar::Var("party_maxplayers").get<int>();
maxclientCount = Game::Party_GetMaxPlayers(*Game::partyIngame); //maxclientCount = Game::Party_GetMaxPlayers(*Game::partyIngame);
} }
Utils::InfoString info(Game::Dvar_InfoString_Big(1024)); Utils::InfoString info(Game::Dvar_InfoString_Big(1024));