Unify Maximum supported clients, raised SDKTools limit (bug 5964, r=psychonic).

This commit is contained in:
Kyle Sanderson
2014-05-06 18:40:35 -07:00
parent 6f47b1a89d
commit b1901da79f
13 changed files with 26 additions and 30 deletions
+3 -3
View File
@@ -93,7 +93,7 @@ unsigned int TopMenu::CalcMemUsage()
size += m_Config.strings.GetMemTable()->GetMemUsage();
size += (m_Config.cats.size() * sizeof(int));
size += (sizeof(topmenu_player_t) * (ABSOLUTE_PLAYER_LIMIT + 1));
size += (sizeof(topmenu_player_t) * (SM_MAXPLAYERS + 1));
size += (m_SortedCats.size() * sizeof(unsigned int));
size += (m_UnsortedCats.size() * sizeof(unsigned int));
size += (m_Categories.size() * (sizeof(topmenu_category_t *) + sizeof(topmenu_category_t)));
@@ -938,8 +938,8 @@ void TopMenu::SortCategoriesIfNeeded()
void TopMenu::CreatePlayers(int max_clients)
{
m_max_clients = max_clients;
m_clients = (topmenu_player_t *)malloc(sizeof(topmenu_player_t) * (ABSOLUTE_PLAYER_LIMIT + 1));
memset(m_clients, 0, sizeof(topmenu_player_t) * (ABSOLUTE_PLAYER_LIMIT + 1));
m_clients = (topmenu_player_t *)malloc(sizeof(topmenu_player_t) * (SM_MAXPLAYERS + 1));
memset(m_clients, 0, sizeof(topmenu_player_t) * (SM_MAXPLAYERS + 1));
}
void TopMenu::TearDownClient(topmenu_player_t *player)
-2
View File
@@ -42,8 +42,6 @@
using namespace SourceHook;
using namespace SourceMod;
#define ABSOLUTE_PLAYER_LIMIT 255 // not 256, so we can send the limit as a byte
struct config_category_t
{
int name;