Skip to content

Commit

Permalink
Increase max players array by 1
Browse files Browse the repository at this point in the history
  • Loading branch information
FortyTwoFortyTwo committed Feb 22, 2024
1 parent 5f7e0ba commit 7e116e9
Show file tree
Hide file tree
Showing 7 changed files with 25 additions and 25 deletions.
10 changes: 5 additions & 5 deletions scripting/randomizer.sp
Original file line number Diff line number Diff line change
Expand Up @@ -336,11 +336,11 @@ ConVar g_cvRandomize[view_as<int>(RandomizedType_MAX)];

bool g_bClientRefresh[MAXPLAYERS];

TFClassType g_iClientCurrentClass[MAXPLAYERS][4];
bool g_bFeignDeath[MAXPLAYERS];
int g_iHypeMeterLoaded[MAXPLAYERS] = {INVALID_ENT_REFERENCE, ...};
bool g_bWeaponDecap[MAXPLAYERS];
Handle g_hTimerClientHud[MAXPLAYERS];
TFClassType g_iClientCurrentClass[MAXPLAYERS + 1][4];
bool g_bFeignDeath[MAXPLAYERS + 1];
int g_iHypeMeterLoaded[MAXPLAYERS + 1] = {INVALID_ENT_REFERENCE, ...};
bool g_bWeaponDecap[MAXPLAYERS + 1];
Handle g_hTimerClientHud[MAXPLAYERS + 1];

bool g_bOnTakeDamage;
bool g_bOnTakeDamageClass;
Expand Down
4 changes: 2 additions & 2 deletions scripting/randomizer/controls.sp
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ enum struct ControlsPassive

static ControlsInfo g_controlsInfo[Button_MAX];
static StringMap g_mControlsPassive;
static bool g_bControlsButton[MAXPLAYERS][WeaponSlot_Building+1][view_as<int>(Button_MAX)];
static float g_flControlsCooldown[MAXPLAYERS][WeaponSlot_Building+1];
static bool g_bControlsButton[MAXPLAYERS + 1][WeaponSlot_Building+1][view_as<int>(Button_MAX)];
static float g_flControlsCooldown[MAXPLAYERS + 1][WeaponSlot_Building+1];

public void Controls_Init()
{
Expand Down
24 changes: 12 additions & 12 deletions scripting/randomizer/dhook.sp
Original file line number Diff line number Diff line change
Expand Up @@ -31,22 +31,22 @@ static int g_iInitClassActiveWeapon = INVALID_ENT_REFERENCE;
static int g_iInitClassWeapons[48] = {INVALID_ENT_REFERENCE, ...};
static int g_iBuildingKilledSapper = INVALID_ENT_REFERENCE;

static int g_iHookIdEventKilledPre[MAXPLAYERS];
static int g_iHookIdForceRespawnPre[MAXPLAYERS];
static int g_iHookIdForceRespawnPost[MAXPLAYERS];
static int g_iHookIdEquipWearable[MAXPLAYERS];
static int g_iHookIdGetAmmoCount[MAXPLAYERS];
static int g_iHookIdClientCommand[MAXPLAYERS];
static int g_iHookIdGiveNamedItem[MAXPLAYERS];
static int g_iHookIdInitClassPre[MAXPLAYERS];
static int g_iHookIdInitClassPost[MAXPLAYERS];
static int g_iHookIdEventKilledPre[MAXPLAYERS + 1];
static int g_iHookIdForceRespawnPre[MAXPLAYERS + 1];
static int g_iHookIdForceRespawnPost[MAXPLAYERS + 1];
static int g_iHookIdEquipWearable[MAXPLAYERS + 1];
static int g_iHookIdGetAmmoCount[MAXPLAYERS + 1];
static int g_iHookIdClientCommand[MAXPLAYERS + 1];
static int g_iHookIdGiveNamedItem[MAXPLAYERS + 1];
static int g_iHookIdInitClassPre[MAXPLAYERS + 1];
static int g_iHookIdInitClassPost[MAXPLAYERS + 1];

static int g_iDHookGamerulesPre;
static int g_iDHookGamerulesPost;

static bool g_bDoClassSpecialSkill[MAXPLAYERS];
static bool g_bDoClassSpecialSkillClass[MAXPLAYERS];
static bool g_bApplyBiteEffectsChocolate[MAXPLAYERS];
static bool g_bDoClassSpecialSkill[MAXPLAYERS + 1];
static bool g_bDoClassSpecialSkillClass[MAXPLAYERS + 1];
static bool g_bApplyBiteEffectsChocolate[MAXPLAYERS + 1];

public void DHook_Init(GameData hGameData)
{
Expand Down
6 changes: 3 additions & 3 deletions scripting/randomizer/huds.sp
Original file line number Diff line number Diff line change
Expand Up @@ -143,9 +143,9 @@ enum struct HudWeapon
}

static ArrayList g_aHuds; //Arrays of HudInfo
static ArrayList g_aHudWeapon[MAXPLAYERS]; //Arrays of HudWeapon
static Menu g_iHudClientMenu[MAXPLAYERS];
static int g_iHudClientPage[MAXPLAYERS]; //Current page client is at
static ArrayList g_aHudWeapon[MAXPLAYERS + 1]; //Arrays of HudWeapon
static Menu g_iHudClientMenu[MAXPLAYERS + 1];
static int g_iHudClientPage[MAXPLAYERS + 1]; //Current page client is at

void Huds_Init()
{
Expand Down
2 changes: 1 addition & 1 deletion scripting/randomizer/loadout.sp
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ enum struct RandomizedLoadout
}
}

static RandomizedLoadout g_eLoadoutClient[MAXPLAYERS];
static RandomizedLoadout g_eLoadoutClient[MAXPLAYERS + 1];
static RandomizedLoadout g_eLoadoutGroup[MAX_GROUPS];

static int g_iRandomizeCosmeticId;
Expand Down
2 changes: 1 addition & 1 deletion scripting/randomizer/sdkhook.sp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
static int g_iMedigunBeamRef[MAXPLAYERS] = {INVALID_ENT_REFERENCE, ...};
static int g_iMedigunBeamRef[MAXPLAYERS + 1] = {INVALID_ENT_REFERENCE, ...};
static int g_iTouchLunchbox = INVALID_ENT_REFERENCE;

void SDKHook_HookClient(int iClient)
Expand Down
2 changes: 1 addition & 1 deletion scripting/randomizer/viewmodels.sp
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ enum ViewModels
ViewModels_MAX,
}

static int g_iViewModels[MAXPLAYERS][ViewModels_MAX];
static int g_iViewModels[MAXPLAYERS + 1][ViewModels_MAX];

int ViewModels_GetFromClient(int iClient, ViewModels nViewModels, int iModelIndex, int iWeapon = INVALID_ENT_REFERENCE)
{
Expand Down

0 comments on commit 7e116e9

Please sign in to comment.