CTerrorPlayer::CollectValidObserverTargets
0x009c42e0 · 454 bytes · __thiscall
_ZN13CTerrorPlayer27CollectValidObserverTargetsEP10CUtlVectorIP11CBaseEntity10CUtlMemoryIS2_iEE
Decompiled
undefined (2 params)
/* CTerrorPlayer::CollectValidObserverTargets(CUtlVector<CBaseEntity*, CUtlMemory<CBaseEntity*, int>
>*) */
void __thiscall CTerrorPlayer::CollectValidObserverTargets(CTerrorPlayer *this,CUtlVector *param_1)
{
int *piVar1;
char cVar2;
CBaseEntity *pCVar3;
int iVar4;
uint uVar5;
int iVar6;
CBaseEntity *local_20 [4];
iVar6 = gpGlobals;
if (param_1 != (CUtlVector *)0x0) {
*(undefined4 *)(param_1 + 0xc) = 0;
if (0 < *(int *)(iVar6 + 0x14)) {
iVar6 = 1;
do {
pCVar3 = (CBaseEntity *)UTIL_PlayerByIndex(iVar6);
if ((((pCVar3 != (CBaseEntity *)0x0) && (*(int *)(pCVar3 + 0x30) != 0)) &&
(*(int *)(pCVar3 + 0x30) - *(int *)(gpGlobals + 0x58) >> 4 != 0)) &&
(((cVar2 = (**(code **)(*(int *)pCVar3 + 0x16c))(pCVar3), cVar2 != '\0' &&
(*(int *)(pCVar3 + 0x1f6c) != 2)) &&
((iVar4 = (**(code **)(*(int *)pCVar3 + 0x148))(pCVar3), iVar4 == 0 &&
(cVar2 = (**(code **)(*(int *)this + 0x664))(this,pCVar3), cVar2 != '\0')))))) {
local_20[0] = pCVar3;
CUtlVector<CBaseEntity*,CUtlMemory<CBaseEntity*,int>>::InsertBefore
((CUtlVector<CBaseEntity*,CUtlMemory<CBaseEntity*,int>> *)param_1,
*(int *)(param_1 + 0xc),local_20);
}
iVar6 = iVar6 + 1;
} while (iVar6 <= *(int *)(gpGlobals + 0x14));
}
iVar6 = TheNextBots();
uVar5 = (uint)*(ushort *)(iVar6 + 0x10);
if (uVar5 != 0xffff) {
iVar4 = *(int *)(iVar6 + 4);
do {
piVar1 = *(int **)(iVar4 + uVar5 * 8);
pCVar3 = (CBaseEntity *)(**(code **)(*piVar1 + 0xb4))(piVar1);
cVar2 = (**(code **)(*(int *)this + 0x664))(this,pCVar3);
if (cVar2 != '\0') {
local_20[0] = pCVar3;
CUtlVector<CBaseEntity*,CUtlMemory<CBaseEntity*,int>>::InsertBefore
((CUtlVector<CBaseEntity*,CUtlMemory<CBaseEntity*,int>> *)param_1,
*(int *)(param_1 + 0xc),local_20);
}
iVar4 = *(int *)(iVar6 + 4);
uVar5 = (uint)*(ushort *)(iVar4 + 6 + uVar5 * 8);
} while (uVar5 != 0xffff);
}
iVar6 = 0;
if (0 < DAT_00fa9a14) {
do {
while (cVar2 = (**(code **)(*(int *)this + 0x664))
(this,*(undefined4 *)(g_TransitioningPlayers + iVar6 * 4)),
cVar2 != '\0') {
local_20[0] = *(CBaseEntity **)(g_TransitioningPlayers + iVar6 * 4);
iVar6 = iVar6 + 1;
CUtlVector<CBaseEntity*,CUtlMemory<CBaseEntity*,int>>::InsertBefore
((CUtlVector<CBaseEntity*,CUtlMemory<CBaseEntity*,int>> *)param_1,
*(int *)(param_1 + 0xc),local_20);
if (DAT_00fa9a14 <= iVar6) {
return;
}
}
iVar6 = iVar6 + 1;
} while (iVar6 < DAT_00fa9a14);
}
}
return;
}
SourceMod gamedata
paste intoaddons/sourcemod/gamedata/<your_plugin>.txt
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.
Type inference is best-effort from the C signature - sanity-check the DHooks types before shipping.