ForEachSurvivor<PounceStumbleNearbySurvivors>
0x009eb830 · 820 bytes · __cdecl
_Z15ForEachSurvivorI28PounceStumbleNearbySurvivorsEbRT_
Decompiled
bool (1 param)
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
/* bool ForEachSurvivor<PounceStumbleNearbySurvivors>(PounceStumbleNearbySurvivors&) */
bool ForEachSurvivor<PounceStumbleNearbySurvivors>(PounceStumbleNearbySurvivors *param_1)
{
float fVar1;
float fVar2;
float fVar3;
float fVar4;
float fVar5;
float fVar6;
char cVar7;
CBaseEntity *this;
int iVar8;
float *pfVar9;
int iVar10;
longdouble lVar11;
float fVar12;
undefined4 local_34;
undefined4 local_30;
undefined4 local_28;
undefined4 local_24;
int local_20;
local_34 = 0;
local_30 = 0;
if (___atan2f_finite == 0) {
local_20 = 0;
}
else {
(**(code **)(___atan2f_finite + 0x50))
(___atan2f_finite,&local_34,0,0,0,0,"/data/src/game/server/terror/terrorplayer.h",
0xb2c,&ForEachSurvivor<PounceStumbleNearbySurvivors>(PounceStumbleNearbySurvivors&)::
tm_fmt,"(%s)%s","Unaccounted","ForEachSurvivor");
local_20 = ___atan2f_finite;
}
iVar10 = _DAT_0105db00;
local_28 = local_34;
local_24 = local_30;
/* try { // try from 009eb9d6 to 009eba24 has its CatchHandler @ 009ebb7b */
if (((_DAT_0105d154 != 0) || (DAT_0105d158 == '\0')) &&
(iVar8 = ThreadGetCurrentId(), iVar10 == iVar8)) {
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)) {
iVar10 = 1;
do {
while ((this = (CBaseEntity *)UTIL_PlayerByIndex(iVar10), this == (CBaseEntity *)0x0 ||
(*(int *)(this + 0x30) == 0))) {
LAB_009eb930:
iVar10 = iVar10 + 1;
if (*(int *)(gpGlobals + 0x14) < iVar10) goto LAB_009eb96c;
}
if (*(int *)(this + 0x30) - *(int *)(gpGlobals + 0x58) >> 4 != 0) {
/* try { // try from 009eb905 to 009eb944 has its CatchHandler @ 009ebb90 */
cVar7 = (**(code **)(*(int *)this + 0x16c))(this);
if (((cVar7 != '\0') && (*(int *)(this + 0x1f6c) != 2)) &&
(iVar8 = CBaseEntity::GetTeamNumber(this), iVar8 == 2)) {
/* try { // try from 009eba7f to 009ebb67 has its CatchHandler @ 009ebb90 */
pfVar9 = (float *)(**(code **)(*(int *)this + 0x288))(this);
fVar1 = *pfVar9;
fVar2 = pfVar9[1];
fVar3 = *(float *)(param_1 + 8);
fVar4 = *(float *)(param_1 + 0xc);
fVar5 = pfVar9[2];
fVar6 = *(float *)(param_1 + 0x10);
cVar7 = CTerrorGameRules::IsSurvivalMode();
fVar12 = 160.0;
if (cVar7 == '\0') {
fVar12 = *(float *)(ZombiePounceStumbleRadius._28_4_ + 0x2c);
}
if (((((SQRT((fVar1 - fVar3) * (fVar1 - fVar3) + (fVar2 - fVar4) * (fVar2 - fVar4) +
(fVar5 - fVar6) * (fVar5 - fVar6)) < fVar12) &&
(this != *(CBaseEntity **)(param_1 + 4))) &&
(cVar7 = (**(code **)(*(int *)this + 0x7e8))(this), cVar7 == '\0')) &&
((cVar7 = (**(code **)(*(int *)this + 300))(this), cVar7 != '\0' &&
(g_pGameRules != (CCSGameRules *)0x0)))) &&
(lVar11 = (longdouble)
CCSGameRules::GetAmountOfEntityVisible
(g_pGameRules,(Vector *)(param_1 + 8),this), 0.0 < (float)lVar11))
{
CTerrorPlayer::OnShovedByPounceLanding
((CTerrorPlayer *)this,SUB41(*(undefined4 *)param_1,0));
}
}
goto LAB_009eb930;
}
iVar10 = iVar10 + 1;
} while (iVar10 <= *(int *)(gpGlobals + 0x14));
}
LAB_009eb96c:
iVar10 = _DAT_0105db00;
if (((DAT_0105d158 == '\0') || (_DAT_0105d154 != 0)) &&
(iVar8 = ThreadGetCurrentId(), iVar10 == iVar8)) {
cVar7 = CVProfNode::ExitScope();
if (cVar7 != '\0') {
_DAT_0105d15c = (int *)_DAT_0105d15c[0x19];
}
DAT_0105d158 = _DAT_0105d15c == (int *)0x105d160;
}
if (local_20 != 0) {
(**(code **)(local_20 + 0x54))(local_20,local_28,local_24,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.