ForEachPlayer<IsLadderFreeFunctor>
0x00736130 · 759 bytes · __cdecl
_Z13ForEachPlayerI19IsLadderFreeFunctorEbRT_
Decompiled
bool (1 param)
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
/* bool ForEachPlayer<IsLadderFreeFunctor>(IsLadderFreeFunctor&) */
bool ForEachPlayer<IsLadderFreeFunctor>(IsLadderFreeFunctor *param_1)
{
undefined4 uVar1;
undefined4 uVar2;
char cVar3;
CBasePlayer *this;
int iVar4;
bool bVar5;
int iVar6;
int iVar7;
float fVar8;
float fVar9;
undefined4 local_24;
undefined4 local_20;
local_24 = 0;
local_20 = 0;
if (___atan2f_finite == 0) {
iVar7 = 0;
}
else {
(**(code **)(___atan2f_finite + 0x50))
(___atan2f_finite,&local_24,0,0,0,0,"/data/src/game/server/player.h",0x595,
&ForEachPlayer<IsLadderFreeFunctor>(IsLadderFreeFunctor&)::tm_fmt,"(%s)%s",
"Unaccounted","ForEachPlayer");
iVar7 = ___atan2f_finite;
}
uVar2 = local_20;
uVar1 = local_24;
iVar6 = _DAT_0105db00;
/* try { // try from 007363a6 to 007363f4 has its CatchHandler @ 007364bf */
if (((_DAT_0105d154 != 0) || (DAT_0105d158 == '\0')) &&
(iVar4 = ThreadGetCurrentId(), iVar6 == iVar4)) {
if ((char *)*_DAT_0105d15c != "ForEachPlayer") {
_DAT_0105d15c =
(int *)CVProfNode::GetSubNode((char *)_DAT_0105d15c,0xc0d94f,(char *)0x1,0xbfafa1);
}
CVProfNode::EnterScope();
DAT_0105d158 = '\0';
}
if (0 < *(int *)(gpGlobals + 0x14)) {
iVar6 = 1;
do {
/* try { // try from 007361fb to 0073625c has its CatchHandler @ 00736438 */
this = (CBasePlayer *)UTIL_PlayerByIndex(iVar6);
if (((((this != (CBasePlayer *)0x0) && (*(int *)(this + 0x30) != 0)) &&
((*(int *)(this + 0x30) - *(int *)(gpGlobals + 0x58) >> 4 != 0 &&
((cVar3 = (**(code **)(*(int *)this + 0x16c))(this), cVar3 != '\0' &&
(*(int *)(this + 0x1f6c) != 2)))))) && (this != *(CBasePlayer **)(param_1 + 4))) &&
(cVar3 = CBasePlayer::IsOnLadder(this), cVar3 != '\0')) {
if (((byte)this[0x14d] & 8) != 0) {
/* try { // try from 00736412 to 00736416 has its CatchHandler @ 00736438 */
CBaseEntity::CalcAbsolutePosition((CBaseEntity *)this);
}
iVar4 = *(int *)param_1;
if (((*(float *)(this + 0x2e8) <= *(float *)(iVar4 + 0xc) + 35.5) &&
(*(float *)(iVar4 + 0x18) - 35.5 <= *(float *)(this + 0x2e8) + 71.0)) &&
(fVar9 = *(float *)(iVar4 + 0x14) - *(float *)(this + 0x2e4),
fVar8 = *(float *)(iVar4 + 0x10) - *(float *)(this + 0x2e0),
fVar8 * fVar8 + fVar9 * fVar9 <= 2500.0)) {
bVar5 = false;
goto LAB_0073630e;
}
}
iVar6 = iVar6 + 1;
} while (iVar6 <= *(int *)(gpGlobals + 0x14));
}
bVar5 = true;
LAB_0073630e:
iVar6 = _DAT_0105db00;
if (((DAT_0105d158 == '\0') || (_DAT_0105d154 != 0)) &&
(iVar4 = ThreadGetCurrentId(), iVar6 == iVar4)) {
cVar3 = CVProfNode::ExitScope();
if (cVar3 != '\0') {
_DAT_0105d15c = (int *)_DAT_0105d15c[0x19];
}
DAT_0105d158 = _DAT_0105d15c == (int *)0x105d160;
}
if (iVar7 != 0) {
(**(code **)(iVar7 + 0x54))(iVar7,uVar1,uVar2,0,0,0);
}
return bVar5;
}
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.