CTerrorPlayerAnimState::GetCurrentMaxGroundSpeed
0x0050fb30 · 159 bytes · __thiscall
_ZN22CTerrorPlayerAnimState24GetCurrentMaxGroundSpeedEv
Decompiled
undefined (1 param)
/* CTerrorPlayerAnimState::GetCurrentMaxGroundSpeed() */
longdouble __thiscall CTerrorPlayerAnimState::GetCurrentMaxGroundSpeed(CTerrorPlayerAnimState *this)
{
code *pcVar1;
int iVar2;
undefined4 uVar3;
longdouble lVar4;
iVar2 = CMultiPlayerAnimState::GetMainActivity((CMultiPlayerAnimState *)this);
if (iVar2 != -1) {
pcVar1 = *(code **)(*(int *)this + 0x1c);
uVar3 = CMultiPlayerAnimState::GetMainActivity((CMultiPlayerAnimState *)this);
iVar2 = (*pcVar1)(this,uVar3);
if (iVar2 == 10) {
LAB_0050fbd0:
lVar4 = (longdouble)CTerrorPlayer::GetRunTopSpeed(*(CTerrorPlayer **)(this + 0x118));
return lVar4;
}
if (iVar2 < 0xb) {
if ((iVar2 == 1) || (iVar2 == 6)) {
lVar4 = (longdouble)CTerrorPlayer::GetWalkTopSpeed(*(CTerrorPlayer **)(this + 0x118));
return lVar4;
}
}
else {
if ((iVar2 == 0x1d) || (iVar2 == 0x3be)) goto LAB_0050fbd0;
if (iVar2 == 0xc) {
lVar4 = (longdouble)CTerrorPlayer::GetCrouchTopSpeed(*(CTerrorPlayer **)(this + 0x118));
return lVar4;
}
}
}
return (longdouble)0.0;
}
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.