ForEachTerrorPlayer<FinaleRescuableSurvivor>
0x008925c0 · 325 bytes · __cdecl
_Z19ForEachTerrorPlayerI23FinaleRescuableSurvivorEbRT_
Decompiled
bool (1 param)
/* bool ForEachTerrorPlayer<FinaleRescuableSurvivor>(FinaleRescuableSurvivor&) */
bool ForEachTerrorPlayer<FinaleRescuableSurvivor>(FinaleRescuableSurvivor *param_1)
{
float fVar1;
char cVar2;
CBaseEntity *pCVar3;
int iVar4;
int iVar5;
CSurvivorRescue *this;
float fVar6;
CBaseEntity *local_20 [4];
iVar5 = 1;
if (0 < *(int *)(gpGlobals + 0x14)) {
do {
pCVar3 = (CBaseEntity *)UTIL_PlayerByIndex(iVar5);
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)))) &&
((local_20[0] = pCVar3, cVar2 = (**(code **)(*(int *)pCVar3 + 300))(pCVar3), cVar2 == '\0'
&& (iVar4 = CBaseEntity::GetTeamNumber(local_20[0]), iVar4 == 2)))) {
if (param_1[0x14] == (FinaleRescuableSurvivor)0x0) {
fVar6 = *(float *)(gpGlobals + 0xc) - *(float *)(local_20[0] + 0x340c);
fVar1 = *(float *)(RescueMinDeadTime._28_4_ + 0x2c);
if ((local_20[0][0x30d4] == (CBaseEntity)0x0) && (fVar6 <= fVar1)) {
fVar6 = fVar1;
}
if (fVar6 < fVar1) goto LAB_00892636;
}
this = (CSurvivorRescue *)0x0;
do {
iVar4 = CGlobalEntityList::FindEntityByClassname
((CGlobalEntityList *)gEntList,(CBaseEntity *)this,
"info_survivor_rescue");
if ((iVar4 == 0) ||
(this = (CSurvivorRescue *)
__dynamic_cast(iVar4,&CBaseEntity::typeinfo,&CSurvivorRescue::typeinfo,0),
this == (CSurvivorRescue *)0x0)) {
CUtlVector<CTerrorPlayer*,CUtlMemory<CTerrorPlayer*,int>>::InsertBefore
((CUtlVector<CTerrorPlayer*,CUtlMemory<CTerrorPlayer*,int>> *)param_1,
*(int *)(param_1 + 0xc),(CTerrorPlayer **)local_20);
break;
}
pCVar3 = (CBaseEntity *)CSurvivorRescue::GetSurvivor(this);
} while (pCVar3 != local_20[0]);
}
LAB_00892636:
iVar5 = iVar5 + 1;
} while (iVar5 <= *(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.