ForEachSurvivor<HealthAudit>
0x008aa060 · 721 bytes · __cdecl
_Z15ForEachSurvivorI11HealthAuditEbRT_
Decompiled
bool (1 param)
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
/* bool ForEachSurvivor<HealthAudit>(HealthAudit&) */
bool ForEachSurvivor<HealthAudit>(HealthAudit *param_1)
{
undefined4 uVar1;
undefined4 uVar2;
char cVar3;
CTerrorPlayer *this;
int iVar4;
int iVar5;
int iVar6;
undefined4 local_24;
undefined4 local_20;
local_24 = 0;
local_20 = 0;
if (___atan2f_finite == 0) {
iVar6 = 0;
}
else {
(**(code **)(___atan2f_finite + 0x50))
(___atan2f_finite,&local_24,0,0,0,0,"/data/src/game/server/terror/terrorplayer.h",
0xb2c,&ForEachSurvivor<HealthAudit>(HealthAudit&)::tm_fmt,"(%s)%s","Unaccounted",
"ForEachSurvivor");
iVar6 = ___atan2f_finite;
}
uVar2 = local_20;
uVar1 = local_24;
iVar5 = _DAT_0105db00;
/* try { // try from 008aa1f6 to 008aa244 has its CatchHandler @ 008aa34a */
if (((_DAT_0105d154 != 0) || (DAT_0105d158 == '\0')) &&
(iVar4 = ThreadGetCurrentId(), iVar5 == iVar4)) {
if ((char *)*_DAT_0105d15c != "ForEachSurvivor") {
_DAT_0105d15c =
(int *)CVProfNode::GetSubNode((char *)_DAT_0105d15c,0xc21c28,(char *)0x1,0xbfafa1);
}
CVProfNode::EnterScope();
DAT_0105d158 = '\0';
}
if (0 < *(int *)(gpGlobals + 0x14)) {
iVar5 = 1;
do {
while ((this = (CTerrorPlayer *)UTIL_PlayerByIndex(iVar5), this == (CTerrorPlayer *)0x0 ||
(*(int *)(this + 0x30) == 0))) {
LAB_008aa15d:
iVar5 = iVar5 + 1;
if (*(int *)(gpGlobals + 0x14) < iVar5) goto LAB_008aa194;
}
if (*(int *)(this + 0x30) - *(int *)(gpGlobals + 0x58) >> 4 != 0) {
/* try { // try from 008aa12d to 008aa16c has its CatchHandler @ 008aa384 */
cVar3 = (**(code **)(*(int *)this + 0x16c))(this);
/* try { // try from 008aa29f to 008aa331 has its CatchHandler @ 008aa384 */
if (((cVar3 != '\0') && (*(int *)(this + 0x1f6c) != 2)) &&
((iVar4 = CBaseEntity::GetTeamNumber((CBaseEntity *)this), iVar4 == 2 &&
(cVar3 = (**(code **)(*(int *)this + 300))(this), cVar3 != '\0')))) {
iVar4 = CCSPlayer::GetCSWeapon((CCSPlayer *)this,0x18);
if (iVar4 != 0) {
param_1[5] = (HealthAudit)0x1;
}
cVar3 = CTerrorPlayer::IsOnThirdStrike(this);
if (cVar3 != '\0') {
param_1[4] = (HealthAudit)0x1;
}
if ((float)*(int *)(this + 0x100) <
*(float *)(DirectorConvertPillsCriticalHealth._28_4_ + 0x2c)) {
iVar4 = CTerrorPlayer::GetTerrorWeapon(this,0xc);
if (iVar4 == 0) {
*(int *)param_1 = *(int *)param_1 + 1;
}
}
else {
iVar4 = CTerrorPlayer::GetTerrorWeapon(this,0xc);
if (iVar4 != 0) {
*(int *)param_1 = *(int *)param_1 + -1;
}
}
}
goto LAB_008aa15d;
}
iVar5 = iVar5 + 1;
} while (iVar5 <= *(int *)(gpGlobals + 0x14));
}
LAB_008aa194:
iVar5 = _DAT_0105db00;
if (((DAT_0105d158 == '\0') || (_DAT_0105d154 != 0)) &&
(iVar4 = ThreadGetCurrentId(), iVar5 == iVar4)) {
cVar3 = CVProfNode::ExitScope();
if (cVar3 != '\0') {
_DAT_0105d15c = (int *)_DAT_0105d15c[0x19];
}
DAT_0105d158 = _DAT_0105d15c == (int *)0x105d160;
}
if (iVar6 != 0) {
(**(code **)(iVar6 + 0x54))(iVar6,uVar1,uVar2,0,0,0);
}
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.