CWatcherList::GetCallbackObjects
0x00477e90 · 179 bytes · __thiscall
_ZN12CWatcherList18GetCallbackObjectsEPP16IWatcherCallbacki
Decompiled
undefined (3 params)
/* CWatcherList::GetCallbackObjects(IWatcherCallback**, int) */
int __thiscall
CWatcherList::GetCallbackObjects(CWatcherList *this,IWatcherCallback **param_1,int param_2)
{
uint *puVar1;
ushort uVar2;
uint uVar3;
ushort uVar4;
undefined *puVar5;
int iVar6;
iVar6 = 0;
uVar4 = *(ushort *)(DAT_00f7e88c + (uint)*(ushort *)this * 10);
do {
while( true ) {
if (uVar4 == 0xffff) {
return iVar6;
}
puVar1 = (uint *)(g_WatcherList + (uint)uVar4 * 0xc);
uVar3 = *puVar1;
uVar2 = *(ushort *)((int)puVar1 + 10);
if ((((uVar3 != 0xffffffff) &&
(puVar5 = g_pEntityList + (uVar3 & 0xfff) * 0x10, puVar5 != (undefined *)0xfffffffc)) &&
(*(uint *)(puVar5 + 8) == uVar3 >> 0xc)) && (*(int *)(puVar5 + 4) != 0)) break;
CUtlMultiList<watcher_t,unsigned_short>::Remove
((CUtlMultiList<watcher_t,unsigned_short> *)&g_WatcherList,*(ushort *)this,uVar4);
uVar4 = uVar2;
}
param_1[iVar6] = (IWatcherCallback *)puVar1[1];
iVar6 = iVar6 + 1;
uVar4 = uVar2;
} while (iVar6 < param_2);
return iVar6;
}
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.