From fe126a43083c668009a83a2e8fce93f1371e33c5 Mon Sep 17 00:00:00 2001 From: momo5502 Date: Sat, 25 Feb 2017 00:52:11 +0100 Subject: [PATCH] [Party] Correctly parse max players --- src/Components/Modules/Console.cpp | 4 ++-- src/Components/Modules/Party.cpp | 4 ++-- src/Components/Modules/ServerInfo.cpp | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/Components/Modules/Console.cpp b/src/Components/Modules/Console.cpp index 3a8a66f7..247772f3 100644 --- a/src/Components/Modules/Console.cpp +++ b/src/Components/Modules/Console.cpp @@ -66,8 +66,8 @@ namespace Components } else { - //maxclientCount = Dvar::Var("sv_maxclients").get(); - maxclientCount = Game::Party_GetMaxPlayers(*Game::partyIngame); + maxclientCount = Dvar::Var("party_maxplayers").get(); + //maxclientCount = Game::Party_GetMaxPlayers(*Game::partyIngame); clientCount = Game::PartyHost_CountMembers(reinterpret_cast(0x1081C00)); } diff --git a/src/Components/Modules/Party.cpp b/src/Components/Modules/Party.cpp index 5597dd34..d4639913 100644 --- a/src/Components/Modules/Party.cpp +++ b/src/Components/Modules/Party.cpp @@ -302,8 +302,8 @@ namespace Components } else { - //maxclientCount = Dvar::Var("sv_maxclients").get(); - maxclientCount = Game::Party_GetMaxPlayers(*Game::partyIngame); + maxclientCount = Dvar::Var("party_maxplayers").get(); + //maxclientCount = Game::Party_GetMaxPlayers(*Game::partyIngame); clientCount = Game::PartyHost_CountMembers(reinterpret_cast(0x1081C00)); } diff --git a/src/Components/Modules/ServerInfo.cpp b/src/Components/Modules/ServerInfo.cpp index 433b433b..65cf600c 100644 --- a/src/Components/Modules/ServerInfo.cpp +++ b/src/Components/Modules/ServerInfo.cpp @@ -116,8 +116,8 @@ namespace Components if (!maxclientCount) { - //maxclientCount = Dvar::Var("sv_maxclients").get(); - maxclientCount = Game::Party_GetMaxPlayers(*Game::partyIngame); + maxclientCount = Dvar::Var("party_maxplayers").get(); + //maxclientCount = Game::Party_GetMaxPlayers(*Game::partyIngame); } Utils::InfoString info(Game::Dvar_InfoString_Big(1024));