CFire::AddHeat
0x006a0750 · 270 bytes · __regparm3
_ZN5CFire7AddHeatEfb.part.60
Decompiled
undefined (2 params)
/* CFire::AddHeat(float, bool) [clone .part.60] */
void __regparm3 CFire::AddHeat(float param_1,bool param_2)
{
float fVar1;
float fVar2;
uint uVar3;
undefined *puVar4;
float in_XMM0_Da;
float fVar5;
float fVar6;
fVar1 = *(float *)((int)param_1 + 0x460);
if ((!param_2) && (0.0 < fVar1)) {
in_XMM0_Da = in_XMM0_Da * *(float *)(fire_incomingheatscale._28_4_ + 0x2c);
}
*(float *)((int)param_1 + 0x454) = *(float *)(gpGlobals + 0xc) + 0.5;
fVar5 = *(float *)((int)param_1 + 0x464);
if (0.0 < fVar5) {
fVar2 = *(float *)(fire_absorbrate._28_4_ + 0x2c);
fVar6 = in_XMM0_Da * fVar2;
if (fVar6 <= fVar5) {
*(float *)((int)param_1 + 0x464) = fVar5 - fVar6;
in_XMM0_Da = 0.0;
}
else {
*(undefined4 *)((int)param_1 + 0x464) = 0;
in_XMM0_Da = in_XMM0_Da - fVar5 / fVar2;
}
}
fVar5 = in_XMM0_Da + fVar1;
*(float *)((int)param_1 + 0x460) = fVar5;
if (((fVar1 <= 0.0) && (0.0 < fVar5)) &&
((uVar3 = *(uint *)((int)param_1 + 0x440), uVar3 == 0xffffffff ||
(((puVar4 = g_pEntityList + (uVar3 & 0xfff) * 0x10, puVar4 == (undefined *)0xfffffffc ||
(*(uint *)(puVar4 + 8) != uVar3 >> 0xc)) || (*(int *)(puVar4 + 4) == 0)))))) {
StartFire((CFire *)param_1);
fVar5 = *(float *)((int)param_1 + 0x460);
}
if (*(float *)((int)param_1 + 0x46c) < fVar5) {
*(float *)((int)param_1 + 0x460) = *(float *)((int)param_1 + 0x46c);
}
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.