CDirector::GetMobSpawnMaxInterval
0x008791b0 · 136 bytes · __thiscall
_ZNK9CDirector22GetMobSpawnMaxIntervalEv
Decompiled
undefined (1 param)
/* CDirector::GetMobSpawnMaxInterval() const */
longdouble __thiscall CDirector::GetMobSpawnMaxInterval(CDirector *this)
{
int iVar1;
longdouble lVar2;
float fVar3;
lVar2 = (longdouble)GetScriptValue(this,"MobSpawnMaxTime",-1.0);
fVar3 = (float)lVar2;
if (fVar3 == -1.0) {
iVar1 = GetDifficulty();
if (iVar1 == 2) {
fVar3 = *(float *)(DirectorPrivate_ZombieMobSpawnMaxTimeHard._28_4_ + 0x2c);
}
else if (iVar1 == 3) {
fVar3 = *(float *)(DirectorPrivate_ZombieMobSpawnMaxTimeExpert._28_4_ + 0x2c);
}
else {
if (iVar1 != 1) {
return (longdouble)*(float *)(DirectorPrivate_ZombieMobSpawnMaxTimeEasy._28_4_ + 0x2c);
}
fVar3 = *(float *)(DirectorPrivate_ZombieMobSpawnMaxTimeNormal._28_4_ + 0x2c);
}
}
return (longdouble)fVar3;
}
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.