ForEachTerrorPlayer<ObserverCollector>
0x009ee6a0 · 230 bytes · __cdecl
_Z19ForEachTerrorPlayerI17ObserverCollectorEbRT_
Decompiled
bool (1 param)
/* bool ForEachTerrorPlayer<ObserverCollector>(ObserverCollector&) */
bool ForEachTerrorPlayer<ObserverCollector>(ObserverCollector *param_1)
{
char cVar1;
CTerrorPlayer *pCVar2;
int iVar3;
int iVar4;
CTerrorPlayer *local_20 [4];
iVar4 = 1;
if (0 < *(int *)(gpGlobals + 0x14)) {
do {
pCVar2 = (CTerrorPlayer *)UTIL_PlayerByIndex(iVar4);
if ((((((pCVar2 != (CTerrorPlayer *)0x0) && (*(int *)(pCVar2 + 0x30) != 0)) &&
(*(int *)(pCVar2 + 0x30) - *(int *)(gpGlobals + 0x58) >> 4 != 0)) &&
((cVar1 = (**(code **)(*(int *)pCVar2 + 0x16c))(pCVar2), cVar1 != '\0' &&
(*(int *)(pCVar2 + 0x1f6c) != 2)))) &&
((local_20[0] = pCVar2, *(int *)(pCVar2 + 0x23bc) == 6 &&
(iVar3 = (**(code **)(*(int *)pCVar2 + 0x654))(pCVar2), iVar3 == *(int *)param_1)))) &&
((iVar3 = (**(code **)(*(int *)local_20[0] + 0x648))(local_20[0]), iVar3 == 5 ||
(iVar3 = (**(code **)(*(int *)local_20[0] + 0x648))(local_20[0]), iVar3 == 4)))) {
CUtlVector<CTerrorPlayer*,CUtlMemory<CTerrorPlayer*,int>>::InsertBefore
((CUtlVector<CTerrorPlayer*,CUtlMemory<CTerrorPlayer*,int>> *)(param_1 + 4),
*(int *)(param_1 + 0x10),local_20);
}
iVar4 = iVar4 + 1;
} while (iVar4 <= *(int *)(gpGlobals + 0x14));
}
return true;
}
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.