added compile-time support for up to 64 maxplayers

This commit is contained in:
jeefo 2016-03-10 00:37:33 +03:00
commit 5ff6b9ecde
8 changed files with 28 additions and 13 deletions

View file

@ -552,6 +552,7 @@ const int MAX_WAYPOINTS = 1024;
const int MAX_WEAPONS = 32;
const int NUM_WEAPONS = 26;
const int MAX_COLLIDE_MOVES = 3;
const int MAX_ENGINE_PLAYERS = 32; // we can have 64 players with xash
// weapon masks
const int WEAPON_PRIMARY = ((1 << WEAPON_XM1014) | (1 <<WEAPON_M3) | (1 << WEAPON_MAC10) | (1 << WEAPON_UMP45) | (1 << WEAPON_MP5) | (1 << WEAPON_TMP) | (1 << WEAPON_P90) | (1 << WEAPON_AUG) | (1 << WEAPON_M4A1) | (1 << WEAPON_SG552) | (1 << WEAPON_AK47) | (1 << WEAPON_SCOUT) | (1 << WEAPON_SG550) | (1 << WEAPON_AWP) | (1 << WEAPON_G3SG1) | (1 << WEAPON_M249) | (1 << WEAPON_FAMAS) | (1 << WEAPON_GALIL));
@ -1258,7 +1259,7 @@ class BotManager
private:
Array <CreateQueue> m_creationTab; // bot creation tab
Bot *m_bots[32]; // all available bots
Bot *m_bots[MAX_ENGINE_PLAYERS]; // all available bots
float m_maintainTime; // time to maintain bot creation
float m_quotaMaintainTime; // time to maintain bot quota

View file

@ -185,7 +185,7 @@ public:
inline int GetTeam (edict_t *ent)
{
extern Client g_clients[32];
extern Client g_clients[MAX_ENGINE_PLAYERS];
#ifndef XASH_CSDM
return g_clients[IndexOfEntity (ent) - 1].team;

View file

@ -48,7 +48,7 @@ extern int g_rusherWeaponPrefs[NUM_WEAPONS];
extern int g_carefulWeaponPrefs[NUM_WEAPONS];
extern int g_grenadeBuyPrecent[NUM_WEAPONS - 23];
extern int g_botBuyEconomyTable[NUM_WEAPONS - 15];
extern int g_radioSelect[32];
extern int g_radioSelect[MAX_ENGINE_PLAYERS];
extern int g_lastRadio[2];
extern int g_storeAddbotVars[4];
extern int *g_weaponPrefs[];
@ -62,7 +62,7 @@ extern RandomSequenceOfUnique Random;
extern WeaponSelect g_weaponSelect[NUM_WEAPONS + 1];
extern WeaponProperty g_weaponDefs[MAX_WEAPONS + 1];
extern Client g_clients[32];
extern Client g_clients[MAX_ENGINE_PLAYERS];
extern MenuText g_menus[21];
extern TaskItem g_taskFilters[];