Skip to content
This repository was archived by the owner on Mar 23, 2024. It is now read-only.

Commit 654f14a

Browse files
committed
replace g_iMaxPlayers by MaxClients
1 parent 4f95ded commit 654f14a

File tree

4 files changed

+7
-15
lines changed

4 files changed

+7
-15
lines changed

cstrike/addons/amxmodx/scripting/CSDM_ReAPI/csdm_core.sma

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
#include <fakemeta>
44

55

6-
#define IsPlayer(%1) (1 <= %1 <= g_iMaxPlayers)
6+
#define IsPlayer(%1) (1 <= %1 <= MaxClients)
77

88
const Float:MIN_RESPAWN_TIME = 0.1
99
const Float:MAX_RESPAWN_TIME = 15.0
@@ -31,7 +31,7 @@ enum forwardlist_e
3131
new HookChain:g_hTraceAttack
3232
new Array:g_aConfigData, Trie:g_tConfigSections, Trie:g_tConfigValues
3333
new g_eCustomForwards[forwardlist_e]
34-
new g_iIgnoreReturn, g_iMaxPlayers, g_iFwdEmitSound, g_iTotalItems
34+
new g_iIgnoreReturn, g_iFwdEmitSound, g_iTotalItems
3535

3636
new Float:g_flRespawnDelay = MIN_RESPAWN_TIME, GameTypes:g_iGamemode
3737
new bool:g_bShowRespawnBar, bool:g_bFreeForAll, bool:g_bBlockGunpickupSound
@@ -90,7 +90,6 @@ public plugin_init()
9090
set_msg_block(get_user_msgid("HudTextArgs"), BLOCK_SET)
9191
set_msg_block(get_user_msgid("ClCorpse"), BLOCK_SET)
9292

93-
g_iMaxPlayers = get_maxplayers()
9493
ExecuteForward(g_eCustomForwards[iFwdInitialized], g_iIgnoreReturn, CSDM_VERSION)
9594
}
9695

cstrike/addons/amxmodx/scripting/CSDM_ReAPI/csdm_map_cleaner.sma

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
#include <hamsandwich>
55

66

7-
#define IsPlayer(%1) (1 <= %1 <= g_iMaxPlayers)
7+
#define IsPlayer(%1) (1 <= %1 <= MaxClients)
88

99
enum
1010
{
@@ -40,7 +40,7 @@ new const g_szMapEntityList[][] =
4040
"player_weaponstrip"
4141
}
4242

43-
new Trie:g_tMapEntitys, g_iFwdEntitySpawn, g_iMaxPlayers, g_iFwdSetModel
43+
new Trie:g_tMapEntitys, g_iFwdEntitySpawn, g_iFwdSetModel
4444
new g_bitRemoveObjects, bool:g_bRemoveWeapons, bool:g_bExcludeBomb
4545
new HamHook:g_hWeaponBoxSpawn, HamHook:g_hShieldSpawn
4646

@@ -84,8 +84,6 @@ public plugin_init()
8484

8585
DisableHamForward(g_hWeaponBoxSpawn = RegisterHam(Ham_Spawn, "weaponbox", "CWeaponBox_Spawn", .Post = true))
8686
DisableHamForward(g_hShieldSpawn = RegisterHam(Ham_Spawn, "weapon_shield", "CWShield_Spawn", .Post = true))
87-
88-
g_iMaxPlayers = get_maxplayers()
8987
}
9088

9189
public plugin_cfg()

cstrike/addons/amxmodx/scripting/CSDM_ReAPI/csdm_misc.sma

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
#include <csdm>
44

55

6-
#define IsPlayer(%1) (1 <= (%1) <= g_iMaxPlayers)
6+
#define IsPlayer(%1) (1 <= (%1) <= MaxClients)
77

88
const HideWeapon_Flags = 1 // "HideWeapon" msg argument
99

@@ -18,7 +18,6 @@ new const g_szWeaponList[][] =
1818
new HamHook:g_hSecondaryAttack[sizeof(g_szWeaponList)], HamHook:g_hAddToPlayer[sizeof(g_szWeaponList)]
1919

2020
new g_bWeaponState[MAX_CLIENTS + 1][CSW_P90 + 1]
21-
new g_iMaxPlayers
2221

2322
new bool:g_bWeaponStateRemember = true, g_bitHideHudFlags, g_iRefillClip = 1
2423

@@ -32,8 +31,6 @@ public plugin_init()
3231
DisableHamForward(g_hAddToPlayer[i] = RegisterHam(Ham_Item_AddToPlayer, g_szWeaponList[i], "CBasePlayerItem_AddToPlayer", .Post = true))
3332
DisableHamForward(g_hSecondaryAttack[i] = RegisterHam(Ham_Weapon_SecondaryAttack, g_szWeaponList[i], "CBasePlayerItem_SecAttack", .Post = true))
3433
}
35-
36-
g_iMaxPlayers = get_maxplayers()
3734
}
3835

3936
public plugin_cfg()

cstrike/addons/amxmodx/scripting/CSDM_ReAPI/csdm_spawn_manager.sma

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77

88
#define IsVectorZero(%1) (%1[X] == 0.0 && %1[Y] == 0.0 && %1[Z] == 0.0)
9-
#define IsPlayer(%1) (1 <= %1 <= g_iMaxPlayers)
9+
#define IsPlayer(%1) (1 <= %1 <= MaxClients)
1010

1111
#define FIND_ENT_IN_SPHERE(%1,%2,%3) engfunc(EngFunc_FindEntityInSphere, %1, %2, %3)
1212

@@ -50,7 +50,7 @@ new Float:g_vecLastOrigin[MAX_CLIENTS + 1][coord_e],
5050
new g_pAimedEntity[MAX_CLIENTS + 1], g_iLastSpawnIndex[MAX_CLIENTS + 1], bool:g_bFirstSpawn[MAX_CLIENTS + 1]
5151
new g_szSpawnDirectory[PLATFORM_MAX_PATH], g_szSpawnFile[PLATFORM_MAX_PATH + 32], g_szMapName[32]
5252
new g_iTotalPoints, g_iEditorMenuID, bool:g_bEditSpawns, bool:g_bNotSaved
53-
new g_iGravity, g_iMaxPlayers
53+
new g_iGravity
5454

5555
public plugin_precache()
5656
{
@@ -65,8 +65,6 @@ public plugin_init()
6565
register_menucmd((g_iEditorMenuID = register_menuid(g_szEditorMenuTitle)), MENU_KEY_BITS, "EditorMenuHandler")
6666

6767
DisableHookChain(g_hGetPlayerSpawnSpot = RegisterHookChain(RG_CSGameRules_GetPlayerSpawnSpot, "CSGameRules_GetPlayerSpawnSpot", .post = false))
68-
69-
g_iMaxPlayers = get_maxplayers()
7068
}
7169

7270
public plugin_cfg()

0 commit comments

Comments
 (0)