CMathCounter::UpdateOutValue
0x006ea310 · 373 bytes · __thiscall
_ZN12CMathCounter14UpdateOutValueEP11CBaseEntityf
Decompiled
undefined (3 params)
/* CMathCounter::UpdateOutValue(CBaseEntity*, float) */
void __thiscall CMathCounter::UpdateOutValue(CMathCounter *this,CBaseEntity *param_1,float param_2)
{
float local_34;
undefined4 local_30;
undefined4 local_2c;
undefined4 local_28;
undefined4 local_24;
undefined4 local_20;
if ((*(float *)(this + 0x440) == 0.0) && (local_34 = param_2, *(float *)(this + 0x444) == 0.0))
goto LAB_006ea37f;
if (*(float *)(this + 0x444) <= param_2) {
if (this[0x449] != (CMathCounter)0x0) goto LAB_006ea351;
this[0x449] = (CMathCounter)0x1;
COutputEvent::FireOutput((COutputEvent *)(this + 0x494),param_1,(CBaseEntity *)this,0.0);
if (param_2 <= *(float *)(this + 0x440)) goto LAB_006ea35a;
LAB_006ea448:
this[0x448] = (CMathCounter)0x0;
}
else {
this[0x449] = (CMathCounter)0x0;
LAB_006ea351:
if (*(float *)(this + 0x440) < param_2) goto LAB_006ea448;
LAB_006ea35a:
if (this[0x448] == (CMathCounter)0x0) {
this[0x448] = (CMathCounter)0x1;
COutputEvent::FireOutput((COutputEvent *)(this + 0x47c),param_1,(CBaseEntity *)this,0.0);
}
}
local_34 = *(float *)(this + 0x444);
if ((param_2 <= *(float *)(this + 0x444)) &&
(local_34 = param_2, param_2 <= *(float *)(this + 0x440))) {
local_34 = *(float *)(this + 0x440);
}
LAB_006ea37f:
variant_t::Set((variant_t *)(this + 0x44c),1,&local_34);
local_30 = *(undefined4 *)(this + 0x44c);
local_2c = *(undefined4 *)(this + 0x450);
local_28 = *(undefined4 *)(this + 0x454);
local_24 = *(undefined4 *)(this + 0x458);
local_20 = *(undefined4 *)(this + 0x45c);
CBaseEntityOutput::FireOutput((CBaseEntityOutput *)(this + 0x44c),&local_30,param_1,this,0);
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.