CMatchEventsSubscription::RegisterEventData
0x0005cad0 · 148 bytes · __thiscall
_ZN24CMatchEventsSubscription17RegisterEventDataEP9KeyValues
Decompiled
undefined (2 params)
/* CMatchEventsSubscription::RegisterEventData(KeyValues*) */
void __thiscall
CMatchEventsSubscription::RegisterEventData(CMatchEventsSubscription *this,KeyValues *param_1)
{
undefined4 *puVar1;
char *pcVar2;
char *pcVar3;
int iVar4;
int iVar5;
if (((param_1 != (KeyValues *)0x0) &&
(pcVar2 = (char *)KeyValues::GetName(param_1), pcVar2 != (char *)0x0)) && (*pcVar2 != '\0')) {
iVar4 = *(int *)(this + 100);
if (0 < iVar4) {
iVar5 = 0;
do {
puVar1 = (undefined4 *)(*(int *)(this + 0x58) + iVar5 * 4);
pcVar3 = (char *)KeyValues::GetName((KeyValues *)*puVar1);
iVar4 = _V_stricmp(pcVar2,pcVar3);
if (iVar4 == 0) {
KeyValues::deleteThis();
*puVar1 = param_1;
return;
}
iVar4 = *(int *)(this + 100);
iVar5 = iVar5 + 1;
} while (iVar5 < iVar4);
}
CUtlVector<KeyValues*,CUtlMemory<KeyValues*,int>>::InsertBefore
((CUtlVector<KeyValues*,CUtlMemory<KeyValues*,int>> *)(this + 0x58),iVar4,¶m_1);
return;
}
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.