Studio_CPS
0x00b956e0 · 130 bytes · __cdecl
_Z10Studio_CPSPK10CStudioHdrR16mstudioseqdesc_tiPKf
Decompiled
undefined (4 params)
/* Studio_CPS(CStudioHdr const*, mstudioseqdesc_t&, int, float const*) */
longdouble Studio_CPS(CStudioHdr *param_1,mstudioseqdesc_t *param_2,int param_3,float *param_4)
{
float fVar1;
mstudioanimdesc_t *pmVar2;
int iVar3;
int iVar4;
float fVar5;
mstudioanimdesc_t *local_2c [4];
float local_1c [4];
Studio_SeqAnims(param_1,param_2,param_3,param_4,local_2c,local_1c);
iVar4 = 0;
fVar5 = 0.0;
do {
fVar1 = local_1c[iVar4];
if (0.0 < fVar1) {
pmVar2 = local_2c[iVar4];
iVar3 = *(int *)(pmVar2 + 0x10);
if (1 < iVar3) {
fVar5 = fVar5 + (*(float *)(pmVar2 + 8) / (float)(iVar3 + -1)) * fVar1;
}
}
iVar4 = iVar4 + 1;
} while (iVar4 != 4);
return (longdouble)fVar5;
}
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.