CalcAutoplaySequences
0x00b8f550 · 295 bytes · __cdecl
_Z21CalcAutoplaySequencesPK10CStudioHdrP10CIKContextP6VectorP10QuaternionPKfif
Decompiled
undefined (7 params)
/* CalcAutoplaySequences(CStudioHdr const*, CIKContext*, Vector*, Quaternion*, float const*, int,
float) */
void CalcAutoplaySequences
(CStudioHdr *param_1,CIKContext *param_2,Vector *param_3,Quaternion *param_4,
float *param_5,int param_6,float param_7)
{
int iVar1;
mstudioseqdesc_t *pmVar2;
uint uVar3;
int iVar4;
longdouble lVar5;
ushort *local_20 [4];
if (param_2 != (CIKContext *)0x0) {
CIKContext::AddAutoplayLocks(param_2,param_3,param_4);
}
local_20[0] = (ushort *)0x0;
iVar4 = 0;
iVar1 = studiohdr_t::GetAutoplayList(*(studiohdr_t **)param_1,local_20);
if (0 < iVar1) {
do {
while( true ) {
uVar3 = (uint)*(ushort *)((int)local_20[0] + iVar4);
pmVar2 = (mstudioseqdesc_t *)CStudioHdr::pSeqdesc(param_1,uVar3);
if (((byte)pmVar2[0xc] & 8) == 0) break;
iVar4 = iVar4 + 2;
lVar5 = (longdouble)Studio_CPS(param_1,pmVar2,uVar3,param_5);
AccumulatePose(param_1,(CIKContext *)0x0,param_3,param_4,uVar3,
(float)lVar5 * param_7 - (float)(int)((float)lVar5 * param_7),param_5,param_6
,1.0,param_7);
if (iVar4 == iVar1 * 2) goto LAB_00b8f652;
}
iVar4 = iVar4 + 2;
} while (iVar4 != iVar1 * 2);
}
LAB_00b8f652:
if (param_2 != (CIKContext *)0x0) {
CIKContext::SolveAutoplayLocks(param_2,param_3,param_4);
}
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.