CDirectorChallengeMode::GetCommonInfectedLimit
0x00899920 · 285 bytes · __thiscall
_ZNK22CDirectorChallengeMode22GetCommonInfectedLimitEPi
Decompiled
undefined (2 params)
/* CDirectorChallengeMode::GetCommonInfectedLimit(int*) const */
uint __thiscall
CDirectorChallengeMode::GetCommonInfectedLimit(CDirectorChallengeMode *this,int *param_1)
{
CDirectorChallengeMode CVar1;
char cVar2;
int *piVar3;
uint uVar4;
int iVar5;
int iVar6;
CVar1 = this[1];
if (CVar1 != (CDirectorChallengeMode)0x0) {
if (-1 < *(int *)(gpGlobals + 0x14)) {
iVar6 = 0;
do {
while ((piVar3 = (int *)UTIL_PlayerByIndex(iVar6), piVar3 == (int *)0x0 ||
(piVar3[0xc] == 0))) {
LAB_00899980:
iVar6 = iVar6 + 1;
if (*(int *)(gpGlobals + 0x14) < iVar6) goto LAB_008999bc;
}
if (piVar3[0xc] - *(int *)(gpGlobals + 0x58) >> 4 != 0) {
cVar2 = (**(code **)(*piVar3 + 0x16c))(piVar3);
if ((((cVar2 != '\0') && (piVar3[0x7db] != 2)) &&
(cVar2 = (**(code **)(*piVar3 + 0x550))(piVar3), cVar2 != '\0')) &&
((uVar4 = (**(code **)(*piVar3 + 300))(piVar3), (char)uVar4 != '\0' &&
(iVar5 = CDirector::GetScriptValue(TheDirector,"BileMobSize",-1), -1 < iVar5)))) {
*param_1 = iVar5;
return uVar4;
}
goto LAB_00899980;
}
iVar6 = iVar6 + 1;
} while (iVar6 <= *(int *)(gpGlobals + 0x14));
}
LAB_008999bc:
iVar6 = CDirector::GetScriptValue(TheDirector,"cm_CommonLimit",-1);
if (-1 < iVar6) {
*param_1 = iVar6;
return (uint)(byte)CVar1;
}
}
return 0;
}
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.