CBaseAnimating::GetGroundSpeedVelocity
0x005e29e0 · 250 bytes · __cdecl
_ZN14CBaseAnimating22GetGroundSpeedVelocityEv
Decompiled
undefined (0 params)
/* CBaseAnimating::GetGroundSpeedVelocity() */
float * CBaseAnimating::GetGroundSpeedVelocity(void)
{
float fVar1;
int iVar2;
int *piVar3;
longdouble lVar4;
float *in_stack_00000004;
CBaseAnimating *in_stack_00000008;
undefined4 local_24;
float local_20;
undefined4 local_1c;
float local_18;
float local_14;
float local_10;
piVar3 = *(int **)(in_stack_00000008 + 0x13e0);
if (piVar3 == (int *)0x0) {
iVar2 = CBaseEntity::GetModel((CBaseEntity *)in_stack_00000008);
if (iVar2 == 0) {
piVar3 = *(int **)(in_stack_00000008 + 0x13e0);
}
else {
LockStudioHdr(in_stack_00000008);
piVar3 = *(int **)(in_stack_00000008 + 0x13e0);
}
if (piVar3 == (int *)0x0) goto LAB_005e2ac2;
}
if (*piVar3 != 0) {
lVar4 = (longdouble)GetSequenceMoveYaw(in_stack_00000008,*(int *)(in_stack_00000008 + 0x494));
local_24 = 0;
local_1c = 0;
local_20 = (float)lVar4 + *(float *)(in_stack_00000008 + 0x3ac);
AngleVectors((QAngle *)&local_24,(Vector *)&local_18);
fVar1 = *(float *)(in_stack_00000008 + 0x440);
*in_stack_00000004 = fVar1 * local_18;
in_stack_00000004[1] = local_14 * fVar1;
in_stack_00000004[2] = local_10 * fVar1;
return in_stack_00000004;
}
LAB_005e2ac2:
*in_stack_00000004 = vec3_origin;
in_stack_00000004[1] = DAT_01053d4c;
in_stack_00000004[2] = DAT_01053d50;
return in_stack_00000004;
}
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.