CDirector::GetMaxPlayerZombies
0x0087a770 · 160 bytes · __thiscall
_ZNK9CDirector19GetMaxPlayerZombiesEv
Decompiled
undefined (1 param)
/* CDirector::GetMaxPlayerZombies() const */
int __thiscall CDirector::GetMaxPlayerZombies(CDirector *this)
{
char cVar1;
int iVar2;
int iVar3;
int iVar4;
int local_10;
cVar1 = CDirectorChallengeMode::GetMaxPlayerZombies
(*(CDirectorChallengeMode **)(this + 0x648),&local_10);
if ((cVar1 == '\0') &&
(cVar1 = CDirectorSurvivalMode::GetMaxPlayerZombies
(*(CDirectorSurvivalMode **)(this + 0x640),&local_10), cVar1 == '\0')) {
cVar1 = CTerrorGameRules::HasPlayerControlledZombies();
if (cVar1 == '\0') {
iVar2 = GetMapArcValue(this);
iVar3 = GetDifficulty();
iVar4 = 0;
if (-1 < iVar2) {
iVar4 = iVar2;
}
iVar2 = 4;
if (iVar4 < 5) {
iVar2 = iVar4;
}
local_10 = *(int *)(GetMaxPlayerZombies()::limits + (iVar2 + iVar3 * 5) * 4);
local_10 = GetScriptValue(this,"MaxSpecials",local_10);
}
else {
local_10 = *(int *)(ZombieMaxPlayerZombies._28_4_ + 0x30);
}
}
return local_10;
}
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.