CTerrorPlayer::IsClassOverLimit
0x009b2c10 · 189 bytes · __thiscall
_ZN13CTerrorPlayer16IsClassOverLimitEi
Decompiled
undefined (2 params)
/* CTerrorPlayer::IsClassOverLimit(int) */
bool __thiscall CTerrorPlayer::IsClassOverLimit(CTerrorPlayer *this,int param_1)
{
uint uVar1;
uint uVar2;
int iVar3;
int iVar4;
undefined4 local_5c;
undefined4 local_58;
undefined4 local_54;
int aiStack_50 [6];
int aiStack_38 [6];
undefined1 local_20;
uVar1 = param_1 - 1;
if ((uVar1 < 6) && (iVar3 = *(int *)(IsClassOverLimit(int)::limitConvars + uVar1 * 4), iVar3 != 0)
) {
local_5c = 0;
uVar2 = 0;
local_58 = 0;
local_54 = 0;
do {
*(undefined4 *)((int)aiStack_50 + uVar2) = 0;
uVar2 = uVar2 + 4;
} while (uVar2 < 0x18);
uVar2 = 0;
do {
*(undefined4 *)((int)aiStack_38 + uVar2) = 0;
uVar2 = uVar2 + 4;
} while (uVar2 < 0x18);
local_20 = 1;
ForEachPlayerZombie<ZombieCounter>((ZombieCounter *)&local_5c);
if (*(int *)(*(int *)(iVar3 + 0x1c) + 0x30) <= aiStack_50[uVar1]) {
return true;
}
if (CSWTCH_7471[param_1 + 0x17] != '\0') {
iVar3 = 0;
iVar4 = 0;
do {
if ((&IsClassOverLimit(int)::bIsDominator)[iVar3] != '\0') {
iVar4 = iVar4 + aiStack_38[iVar3];
}
iVar3 = iVar3 + 1;
} while (iVar3 != 6);
return 2 < iVar4;
}
}
return false;
}
SourceMod gamedata
paste intoaddons/sourcemod/gamedata/<your_plugin>.txt
used as the SourceMod key — change to fit your plugin's convention
SourceMod library name (server / engine / matchmaking)
Just a Signatures{} block, ready to drop into a gamedata
file. Wire it up in your plugin however you like - SDKCall, DHooks,
raw memory ops, or anything else.
Signatures + Functions block. The plugin uses
DHookCreateFromConf - DHooks reads return type, this-type,
calling convention, and argument types straight from the gamedata. Less
boilerplate in the plugin, types travel with the gamedata.
Gamedata KeyValues
DHooks plugin example
Type inference is best-effort from the C signature - sanity-check the DHooks types before shipping.