CBaseAnimating::GetSequenceGroundSpeed
0x005dfee0 · 271 bytes · __thiscall
_ZN14CBaseAnimating22GetSequenceGroundSpeedEP10CStudioHdri
Decompiled
undefined (3 params)
/* CBaseAnimating::GetSequenceGroundSpeed(CStudioHdr*, int) */
longdouble __thiscall
CBaseAnimating::GetSequenceGroundSpeed(CBaseAnimating *this,CStudioHdr *param_1,int param_2)
{
float fVar1;
longdouble lVar2;
float fVar3;
float local_28;
float local_24;
float local_20;
lVar2 = (longdouble)SequenceDuration(this,param_1,param_2);
if (0.0 < (float)lVar2) {
::GetSequenceLinearMotion(param_1,param_2,(float *)(this + 0x498),(Vector *)&local_28);
fVar1 = *(float *)(this + 0x528);
fVar3 = SQRT(local_28 * local_28 + local_24 * local_24 + local_20 * local_20) / (float)lVar2;
if (fVar1 < 0.0) {
return (longdouble)(*(float *)(this + 0x468) * *(float *)(this + 0x464) * fVar3);
}
if (fVar1 <= 1.0) {
return (longdouble)
(*(float *)(this + 0x468) * *(float *)(this + 0x464) * (1.0 - fVar1) * fVar3);
}
}
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.