CFire::Extinguish
0x0069f6d0 · 253 bytes · __thiscall
_ZN5CFire10ExtinguishEf
Decompiled
undefined (2 params)
/* CFire::Extinguish(float) */
void __thiscall CFire::Extinguish(CFire *this,float param_1)
{
float fVar1;
undefined4 uVar2;
undefined4 uVar3;
int iVar4;
longdouble lVar5;
float fVar6;
iVar4 = gpGlobals;
uVar2 = fire_extabsorb._28_4_;
if (this[0x478] != (CFire)0x0) {
fVar1 = *(float *)(this + 0x460);
*(float *)(this + 0x454) = *(float *)(gpGlobals + 0xc) + 0.5;
*(float *)(this + 0x460) = fVar1 - param_1;
uVar3 = fire_maxabsorb._28_4_;
fVar6 = param_1 * *(float *)(uVar2 + 0x2c) + *(float *)(this + 0x464);
*(float *)(this + 0x464) = fVar6;
if (*(float *)(uVar3 + 0x2c) < fVar6) {
*(float *)(this + 0x464) = *(float *)(uVar3 + 0x2c);
}
lVar5 = (longdouble)
Approach(*(float *)(this + 0x46c) * 0.3125,*(float *)(this + 0x474),
*(float *)(iVar4 + 0x10) + *(float *)(iVar4 + 0x10));
*(float *)(this + 0x474) = (float)lVar5;
if ((*(float *)(this + 0x460) <= 0.0) && (*(undefined4 *)(this + 0x460) = 0, 0.0 < fVar1)) {
GoOut(this);
return;
}
}
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.