EndTrace
0x00119170 · 98 bytes · __cdecl
_Z8EndTraceRP11TraceInfo_t
Decompiled
undefined (1 param)
/* EndTrace(TraceInfo_t*&) */
void EndTrace(TraceInfo_t **param_1)
{
TraceInfo_t *pTVar1;
undefined4 uVar2;
int iVar3;
char cVar4;
int iVar5;
*(int *)(*param_1 + 0x11c) = *(int *)(*param_1 + 0x11c) + -1;
pTVar1 = *param_1;
do {
iVar3 = DAT_003942e4;
uVar2 = g_TraceInfoPool;
iVar5 = DAT_003942e4 + 0x10001;
*(undefined4 *)(pTVar1 + -8) = g_TraceInfoPool;
cVar4 = ThreadInterlockedAssignIf64(&g_TraceInfoPool,pTVar1 + -8,iVar5,uVar2,iVar3);
} while (cVar4 == '\0');
*param_1 = (TraceInfo_t *)0x0;
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.