CDirector::DelayNextSpecialBotSpawn
0x008728f0 · 328 bytes · __thiscall
_ZN9CDirector24DelayNextSpecialBotSpawnEf
Decompiled
undefined (2 params)
/* CDirector::DelayNextSpecialBotSpawn(float) */
void __thiscall CDirector::DelayNextSpecialBotSpawn(CDirector *this,float param_1)
{
int *piVar1;
int iVar2;
longdouble lVar3;
float fVar4;
int local_2c;
float local_28;
if (0 < *(int *)(this + 0x370)) {
iVar2 = 0;
local_2c = -1;
local_28 = 999.0;
do {
fVar4 = *(float *)(*(int *)(this + 0x33c) + iVar2 * 0xc + 8);
lVar3 = (longdouble)CountdownTimer::Now();
if (0.0 < fVar4 - (float)lVar3) {
fVar4 = *(float *)(iVar2 * 0xc + *(int *)(this + 0x33c) + 8);
lVar3 = (longdouble)CountdownTimer::Now();
fVar4 = fVar4 - (float)lVar3;
}
else {
fVar4 = 0.0;
}
if (fVar4 < local_28) {
local_2c = iVar2;
local_28 = fVar4;
}
iVar2 = iVar2 + 1;
} while (iVar2 < *(int *)(this + 0x370));
if (local_2c != -1) {
local_28 = local_28 + param_1;
piVar1 = (int *)(*(int *)(this + 0x33c) + local_2c * 0xc);
lVar3 = (longdouble)CountdownTimer::Now();
if ((float)lVar3 + local_28 != (float)piVar1[2]) {
(**(code **)(*piVar1 + 4))(piVar1,piVar1 + 2);
piVar1[2] = (int)((float)lVar3 + local_28);
}
if (local_28 != (float)piVar1[1]) {
(**(code **)(*piVar1 + 4))(piVar1,piVar1 + 1);
piVar1[1] = (int)local_28;
}
}
}
return;
}
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.