SetEventIndexForSequence
0x003fa9d0 · 174 bytes · __cdecl
_Z24SetEventIndexForSequenceR16mstudioseqdesc_t
Decompiled
undefined (1 param)
/* SetEventIndexForSequence(mstudioseqdesc_t&) */
void SetEventIndexForSequence(mstudioseqdesc_t *param_1)
{
int iVar1;
mstudioseqdesc_t *pmVar2;
int iVar3;
uint uVar4;
undefined4 uVar5;
int iVar6;
int iVar7;
if ((param_1 != (mstudioseqdesc_t *)0x0) &&
(*(uint *)(param_1 + 0xc) = *(uint *)(param_1 + 0xc) | 0x2000, 0 < *(int *)(param_1 + 0x18))) {
iVar7 = 0;
iVar6 = 0;
pmVar2 = param_1 + *(int *)(param_1 + 0x1c);
if (pmVar2 != (mstudioseqdesc_t *)0x0) goto LAB_003faa14;
LAB_003faa00:
iVar6 = iVar6 + 1;
if (iVar6 < *(int *)(param_1 + 0x18)) {
while( true ) {
iVar7 = iVar7 + 0x50;
pmVar2 = param_1 + *(int *)(param_1 + 0x1c) + iVar7;
if (pmVar2 == (mstudioseqdesc_t *)0x0) break;
LAB_003faa14:
if (((byte)pmVar2[9] & 4) == 0) break;
iVar1 = *(int *)(pmVar2 + 0x4c);
iVar3 = EventList_IndexForName((char *)(pmVar2 + iVar1));
if (iVar3 == -1) {
uVar5 = EventList_RegisterPrivateEvent((char *)(pmVar2 + iVar1));
*(undefined4 *)(pmVar2 + 4) = uVar5;
break;
}
*(int *)(pmVar2 + 4) = iVar3;
iVar6 = iVar6 + 1;
uVar4 = EventList_GetEventType(iVar3);
*(uint *)(pmVar2 + 8) = *(uint *)(pmVar2 + 8) | uVar4;
if (*(int *)(param_1 + 0x18) <= iVar6) {
return;
}
}
goto LAB_003faa00;
}
}
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.