Skip to content

Commit

Permalink
Replace TF_MAXPLAYERS to MAXPLAYERS
Browse files Browse the repository at this point in the history
  • Loading branch information
FortyTwoFortyTwo committed Jul 26, 2023
1 parent a14929f commit 95791db
Show file tree
Hide file tree
Showing 9 changed files with 48 additions and 50 deletions.
52 changes: 25 additions & 27 deletions addons/sourcemod/scripting/superzombiefortress.sp
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,9 @@

#include "include/superzombiefortress.inc"

#define PLUGIN_VERSION "4.5.0"
#define PLUGIN_VERSION "4.5.1"
#define PLUGIN_VERSION_REVISION "manual"

#define TF_MAXPLAYERS 34 //32 clients + 1 for 0/world/console + 1 for replay/SourceTV

#define ATTRIB_VISION 406

// Also used in the item schema to define vision filter or vision mode opt in
Expand Down Expand Up @@ -285,12 +283,12 @@ enum struct ClientClasses
}
}

ClientClasses g_ClientClasses[TF_MAXPLAYERS];
ClientClasses g_ClientClasses[MAXPLAYERS];

SZFRoundState g_nRoundState = SZFRoundState_Setup;

Infected g_nInfected[TF_MAXPLAYERS];
Infected g_nNextInfected[TF_MAXPLAYERS];
Infected g_nInfected[MAXPLAYERS];
Infected g_nNextInfected[MAXPLAYERS];

TFTeam TFTeam_Zombie = TFTeam_Blue;
TFTeam TFTeam_Survivor = TFTeam_Red;
Expand Down Expand Up @@ -349,17 +347,17 @@ bool g_bGiveNamedItemSkip;
float g_flSurvivorsLastDeath = 0.0;
int g_iSurvivorsKilledCounter;
int g_iZombiesKilledSpree;
int g_iZombiesKilledSurvivor[TF_MAXPLAYERS];
int g_iZombiesKilledSurvivor[MAXPLAYERS];

//Client State
int g_iMorale[TF_MAXPLAYERS];
int g_iHorde[TF_MAXPLAYERS];
int g_iCapturingPoint[TF_MAXPLAYERS];
int g_iRageTimer[TF_MAXPLAYERS];
int g_iMorale[MAXPLAYERS];
int g_iHorde[MAXPLAYERS];
int g_iCapturingPoint[MAXPLAYERS];
int g_iRageTimer[MAXPLAYERS];

bool g_bStartedAsZombie[TF_MAXPLAYERS];
float g_flStopChatSpam[TF_MAXPLAYERS];
bool g_bWaitingForTeamSwitch[TF_MAXPLAYERS];
bool g_bStartedAsZombie[MAXPLAYERS];
float g_flStopChatSpam[MAXPLAYERS];
bool g_bWaitingForTeamSwitch[MAXPLAYERS];

int g_iSprite; //Smoker beam

Expand Down Expand Up @@ -389,17 +387,17 @@ float g_flZombieDamageScale = 1.0;

ArrayList g_aFastRespawn;

int g_iDamageZombie[TF_MAXPLAYERS];
int g_iDamageTakenLife[TF_MAXPLAYERS];
int g_iDamageDealtLife[TF_MAXPLAYERS];
int g_iDamageZombie[MAXPLAYERS];
int g_iDamageTakenLife[MAXPLAYERS];
int g_iDamageDealtLife[MAXPLAYERS];

float g_flDamageDealtAgainstTank[TF_MAXPLAYERS];
float g_flDamageDealtAgainstTank[MAXPLAYERS];
bool g_bTankRefreshed;

int g_iControlPointsInfo[20][2];
int g_iControlPoints;
bool g_bCapturingLastPoint;
int g_iCarryingItem[TF_MAXPLAYERS] = {INVALID_ENT_REFERENCE, ...};
int g_iCarryingItem[MAXPLAYERS] = {INVALID_ENT_REFERENCE, ...};

float g_flTimeProgress;

Expand All @@ -415,13 +413,13 @@ int g_iTanksSpawned;
bool g_bZombieRage;
bool g_bZombieRageAllowRespawn;

bool g_bSpawnAsSpecialInfected[TF_MAXPLAYERS];
int g_iKillsThisLife[TF_MAXPLAYERS];
int g_iMaxHealth[TF_MAXPLAYERS];
bool g_bShouldBacteriaPlay[TF_MAXPLAYERS] = {true, ...};
bool g_bReplaceRageWithSpecialInfectedSpawn[TF_MAXPLAYERS];
float g_flTimeStartAsZombie[TF_MAXPLAYERS];
bool g_bForceZombieStart[TF_MAXPLAYERS];
bool g_bSpawnAsSpecialInfected[MAXPLAYERS];
int g_iKillsThisLife[MAXPLAYERS];
int g_iMaxHealth[MAXPLAYERS];
bool g_bShouldBacteriaPlay[MAXPLAYERS] = {true, ...};
bool g_bReplaceRageWithSpecialInfectedSpawn[MAXPLAYERS];
float g_flTimeStartAsZombie[MAXPLAYERS];
bool g_bForceZombieStart[MAXPLAYERS];

//Map overwrites
int g_iMaxRareWeapons;
Expand Down Expand Up @@ -1176,7 +1174,7 @@ void Handle_HoardeBonus()
int iLength = 0;
int[] iClients = new int[MaxClients];
int[] iClientsHoardeId = new int[MaxClients];
float vecClientsPos[TF_MAXPLAYERS][3];
float vecClientsPos[MAXPLAYERS][3];

int[] iHoardeSize = new int[MaxClients];

Expand Down
4 changes: 2 additions & 2 deletions addons/sourcemod/scripting/szf/command.sp
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ public Action Command_ForceInfected(int iClient, int iArgs)
return Plugin_Handled;
}

int iTargetList[TF_MAXPLAYERS];
int iTargetList[MAXPLAYERS];
char sTargetName[MAX_TARGET_LENGTH];
bool bIsML;

Expand Down Expand Up @@ -145,7 +145,7 @@ public Action Command_Stun(int iClient, int iArgs)
char sTarget[32];
GetCmdArg(1, sTarget, sizeof(sTarget));

int iTargetList[TF_MAXPLAYERS];
int iTargetList[MAXPLAYERS];
char sTargetName[MAX_TARGET_LENGTH];
bool bIsML;

Expand Down
4 changes: 2 additions & 2 deletions addons/sourcemod/scripting/szf/dhook.sp
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ static DynamicHook g_hDHookRoundRespawn;
static DynamicHook g_hDHookGetCaptureValueForPlayer;
static DynamicHook g_hDHookGiveNamedItem;

static TFTeam g_iOldClientTeam[TF_MAXPLAYERS];
static TFTeam g_iOldClientTeam[MAXPLAYERS];

static int g_iHookIdGiveNamedItem[TF_MAXPLAYERS];
static int g_iHookIdGiveNamedItem[MAXPLAYERS];

void DHook_Init(GameData hSZF)
{
Expand Down
20 changes: 10 additions & 10 deletions addons/sourcemod/scripting/szf/infected.sp
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@ public void Infected_DoNoRage(int iClient)
// Tank
////////////////

static Handle g_hTimerTank[TF_MAXPLAYERS];
static float g_flTankLifetime[TF_MAXPLAYERS];
static int g_iTankHealthSubtract[TF_MAXPLAYERS];
static Handle g_hTimerTank[MAXPLAYERS];
static float g_flTankLifetime[MAXPLAYERS];
static int g_iTankHealthSubtract[MAXPLAYERS];

public void Infected_OnTankSpawn(int iClient)
{
Expand Down Expand Up @@ -345,8 +345,8 @@ void Infected_DoBoomerExplosion(int iClient, float flRadius)
// Charger
////////////////

static float g_flChargerEndCharge[TF_MAXPLAYERS];
static bool g_bChargerHitSurvivor[TF_MAXPLAYERS][TF_MAXPLAYERS];
static float g_flChargerEndCharge[MAXPLAYERS];
static bool g_bChargerHitSurvivor[MAXPLAYERS][MAXPLAYERS];

public void Infected_OnChargerSpawn(int iClient)
{
Expand Down Expand Up @@ -534,7 +534,7 @@ public void Infected_OnStalkerThink(int iClient, int &iButtons)
// Hunter
////////////////

static bool g_bHunterIsUsingPounce[TF_MAXPLAYERS];
static bool g_bHunterIsUsingPounce[MAXPLAYERS];

public void Infected_DoHunterJump(int iClient)
{
Expand Down Expand Up @@ -622,8 +622,8 @@ public void Infected_OnHunterDeath(int iClient, int iKiller, int iAssist)
// Smoker
////////////////

static int g_iSmokerBeamHits[TF_MAXPLAYERS];
static int g_iSmokerBeamHitVictim[TF_MAXPLAYERS];
static int g_iSmokerBeamHits[MAXPLAYERS];
static int g_iSmokerBeamHitVictim[MAXPLAYERS];

public void Infected_OnSmokerThink(int iClient, int &iButtons)
{
Expand Down Expand Up @@ -794,8 +794,8 @@ public void Infected_OnSpitterDeath(int iVictim, int iKiller, int iAssist)
// Jockey
////////////////

static bool g_bJockeyIsUsingPounce[TF_MAXPLAYERS];
static int g_iJockeyTarget[TF_MAXPLAYERS];
static bool g_bJockeyIsUsingPounce[MAXPLAYERS];
static int g_iJockeyTarget[MAXPLAYERS];

public void Infected_DoJockeyJump(int iClient)
{
Expand Down
2 changes: 1 addition & 1 deletion addons/sourcemod/scripting/szf/menu.sp
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ enum MenuSelect
MenuSelect_Infected,
}

static MenuSelect g_nMenuClientSelect[TF_MAXPLAYERS];
static MenuSelect g_nMenuClientSelect[MAXPLAYERS];

void Menu_DisplayMain(int iClient)
{
Expand Down
4 changes: 2 additions & 2 deletions addons/sourcemod/scripting/szf/pickupweapons.sp
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ enum WeaponType
WeaponType_UncommonSpawn,
};

static bool g_bCanPickup[TF_MAXPLAYERS] = {false, ...};
static bool g_bCanPickup[MAXPLAYERS] = {false, ...};
static bool g_bTriggerEntity[2048] = {true, ...};
static float g_flWeaponCallout[2048][TF_MAXPLAYERS];
static float g_flWeaponCallout[2048][MAXPLAYERS];
static int g_iAvailableRareCount;
static ArrayList g_aWeaponsCommon;
static ArrayList g_aWeaponsUncommon;
Expand Down
8 changes: 4 additions & 4 deletions addons/sourcemod/scripting/szf/sound.sp
Original file line number Diff line number Diff line change
Expand Up @@ -53,11 +53,11 @@ enum SoundVo
static StringMap g_mSoundMusic;
static ArrayList g_aSoundVoInfected[view_as<int>(Infected_Count)][view_as<int>(SoundVo_Count)];

static SoundFilepath g_SoundFilepath[TF_MAXPLAYERS];
static SoundMusic g_SoundMusic[TF_MAXPLAYERS];
static Handle g_hSoundMusicTimer[TF_MAXPLAYERS];
static SoundFilepath g_SoundFilepath[MAXPLAYERS];
static SoundMusic g_SoundMusic[MAXPLAYERS];
static Handle g_hSoundMusicTimer[MAXPLAYERS];

bool g_bNoMusicForClient[TF_MAXPLAYERS];
bool g_bNoMusicForClient[MAXPLAYERS];

void Sound_Refresh()
{
Expand Down
2 changes: 1 addition & 1 deletion addons/sourcemod/scripting/szf/stun.sp
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ enum struct StunInfo
float flCurrentBlinkEnd;
}

static StunInfo g_StunInfo[TF_MAXPLAYERS];
static StunInfo g_StunInfo[MAXPLAYERS];

// -----------------------
// MAIN
Expand Down
2 changes: 1 addition & 1 deletion addons/sourcemod/scripting/szf/viewmodel.sp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
static int g_iViewModelRef[TF_MAXPLAYERS] = {INVALID_ENT_REFERENCE, ...};
static int g_iViewModelRef[MAXPLAYERS] = {INVALID_ENT_REFERENCE, ...};

void ViewModel_Create(int iClient, const char[] sModel, const float vecAnglesOffset[3] = NULL_VECTOR, float flHeight = 0.0)
{
Expand Down

0 comments on commit 95791db

Please sign in to comment.