CTerrorPlayer::GetStillTime
0x009aac60 · 340 bytes · __thiscall
_ZNK13CTerrorPlayer12GetStillTimeE13StillnessType
Decompiled
undefined (2 params)
/* CTerrorPlayer::GetStillTime(StillnessType) const */
longdouble __thiscall CTerrorPlayer::GetStillTime(CTerrorPlayer *this,int param_2)
{
longdouble lVar1;
longdouble lVar2;
float fVar3;
float fVar4;
fVar3 = 0.0;
if (param_2 == 1) {
if (0.0 < *(float *)(this + 0x3188)) {
lVar1 = (longdouble)IntervalTimer::Now();
return (longdouble)((float)lVar1 - *(float *)(this + 0x3188));
}
}
else if ((0.0 < *(float *)(this + 0x3188)) && (0.0 < *(float *)(this + 0x3190))) {
lVar1 = (longdouble)IntervalTimer::Now();
fVar4 = 99999.9;
fVar3 = *(float *)(this + 0x3188);
if (0.0 < *(float *)(this + 0x3190)) {
lVar2 = (longdouble)IntervalTimer::Now();
fVar4 = (float)lVar2 - *(float *)(this + 0x3190);
}
if (fVar4 <= (float)lVar1 - fVar3) {
if (0.0 < *(float *)(this + 0x3190)) {
lVar1 = (longdouble)IntervalTimer::Now();
return (longdouble)((float)lVar1 - *(float *)(this + 0x3190));
}
}
else if (0.0 < *(float *)(this + 0x3188)) {
lVar1 = (longdouble)IntervalTimer::Now();
fVar3 = (float)lVar1 - *(float *)(this + 0x3188);
goto LAB_009aad24;
}
return (longdouble)99999.9;
}
LAB_009aad24:
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.