GetChangeTrack
0x001ef050 · 228 bytes · __cdecl
_Z14GetChangeTrackPKc
Decompiled
undefined (1 param)
/* GetChangeTrack(char const*) */
CChangeTrack * GetChangeTrack(char *param_1)
{
int iVar1;
undefined4 *puVar2;
int iVar3;
CChangeTrack *pCVar4;
size_t sVar5;
void *pvVar6;
CChangeTrack *local_20 [4];
iVar1 = DAT_003b230c;
while( true ) {
if (iVar1 == -1) {
pCVar4 = operator_new(0x1c);
*(undefined4 *)(pCVar4 + 0xc) = 0;
*(undefined4 *)(pCVar4 + 0x10) = 0;
*(undefined4 *)(pCVar4 + 0x14) = 0;
*(undefined4 *)(pCVar4 + 0x18) = 0;
local_20[0] = pCVar4;
sVar5 = strlen(param_1);
pvVar6 = operator_new__(sVar5 + 1);
*(void **)pCVar4 = pvVar6;
V_strncpy(*(char **)local_20[0],param_1,sVar5 + 1);
*(undefined4 *)(local_20[0] + 8) = 0;
*(undefined4 *)(local_20[0] + 4) = 0;
CUtlLinkedList<CChangeTrack*,int,false,int,CUtlMemory<UtlLinkedListElem_t<CChangeTrack*,int>,int>>
::InsertBefore((CUtlLinkedList<CChangeTrack*,int,false,int,CUtlMemory<UtlLinkedListElem_t<CChangeTrack*,int>,int>>
*)&g_Tracks,-1,local_20);
return local_20[0];
}
puVar2 = *(undefined4 **)(g_Tracks + iVar1 * 0xc);
iVar3 = _V_stricmp((char *)*puVar2,param_1);
if (iVar3 == 0) break;
iVar1 = *(int *)(g_Tracks + 8 + iVar1 * 0xc);
}
return (CChangeTrack *)puVar2;
}
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.