CTerrorPlayer::UpdateRunningSneakingExertionTimers
0x009fcab0 · 398 bytes · __thiscall
_ZN13CTerrorPlayer35UpdateRunningSneakingExertionTimersEv
Decompiled
undefined (1 param)
/* CTerrorPlayer::UpdateRunningSneakingExertionTimers() */
void __thiscall CTerrorPlayer::UpdateRunningSneakingExertionTimers(CTerrorPlayer *this)
{
uint uVar1;
longdouble lVar2;
uVar1 = *(uint *)(this + 0x1cb0) & 0x20004;
if ((uVar1 == 0) && ((*(uint *)(this + 0x1cb0) & 0x618) != 0)) {
lVar2 = (longdouble)GetWalkTopSpeed(this);
if (((byte)this[0x14d] & 0x10) != 0) {
CBaseEntity::CalcAbsoluteVelocity((CBaseEntity *)this);
}
if (((float)lVar2 * (float)lVar2 <
*(float *)(this + 0x27c) * *(float *)(this + 0x27c) +
*(float *)(this + 0x278) * *(float *)(this + 0x278) +
*(float *)(this + 0x274) * *(float *)(this + 0x274)) &&
(this[0x2edc] = (CTerrorPlayer)0x0, *(float *)(this + 0x2ecc) <= 0.0)) {
lVar2 = (longdouble)IntervalTimer::Now();
if ((float)lVar2 != *(float *)(this + 0x2ecc)) {
(**(code **)(*(int *)(this + 0x2ec8) + 4))(this + 0x2ec8,this + 0x2ecc);
*(float *)(this + 0x2ecc) = (float)lVar2;
}
if (*(float *)(this + 0x2ed8) != -1.0) {
(**(code **)(*(int *)(this + 0x2ed0) + 4))(this + 0x2ed0,this + 0x2ed8);
*(undefined4 *)(this + 0x2ed8) = 0xbf800000;
}
}
}
else {
if (*(float *)(this + 0x2ecc) != -1.0) {
(**(code **)(*(int *)(this + 0x2ec8) + 4))(this + 0x2ec8,this + 0x2ecc);
*(undefined4 *)(this + 0x2ecc) = 0xbf800000;
uVar1 = *(uint *)(this + 0x1cb0) & 0x20004;
}
if (uVar1 != 0) {
this[0x2edc] = (CTerrorPlayer)0x1;
}
}
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.