CGamePlayerZone::InputCountPlayersInZone
0x006f22d0 · 694 bytes · __thiscall
_ZN15CGamePlayerZone23InputCountPlayersInZoneER11inputdata_t
Decompiled
undefined (2 params)
/* CGamePlayerZone::InputCountPlayersInZone(inputdata_t&) */
void __thiscall CGamePlayerZone::InputCountPlayersInZone(CGamePlayerZone *this,inputdata_t *param_1)
{
undefined4 uVar1;
char cVar2;
CBaseEntity *this_00;
Vector *pVVar3;
Vector *pVVar4;
uint uVar5;
int iVar6;
int local_90;
int local_8c;
undefined4 *local_88;
int local_78;
int local_74;
undefined4 local_70;
undefined4 local_6c;
undefined4 local_68;
undefined4 local_64;
undefined4 local_60;
char local_39;
if ((*(int *)(this + 0x440) == 0) ||
(cVar2 = UTIL_IsMasterTriggered(*(undefined4 *)(this + 0x440),*(undefined4 *)param_1),
cVar2 != '\0')) {
local_90 = 0;
local_8c = 0;
if (0 < *(int *)(gpGlobals + 0x14)) {
iVar6 = 1;
do {
while (this_00 = (CBaseEntity *)UTIL_PlayerByIndex(iVar6), this_00 == (CBaseEntity *)0x0) {
LAB_006f237d:
iVar6 = iVar6 + 1;
if (*(int *)(gpGlobals + 0x14) < iVar6) goto LAB_006f2440;
}
uVar5 = *(uint *)(this_00 + 0x150) >> 1 & 1;
pVVar3 = (Vector *)NAI_Hull::Maxs(uVar5);
pVVar4 = (Vector *)NAI_Hull::Mins(uVar5);
if ((((byte)this_00[0x14d] & 8) != 0) &&
(CBaseEntity::CalcAbsolutePosition(this_00), ((byte)this_00[0x14d] & 8) != 0)) {
CBaseEntity::CalcAbsolutePosition(this_00);
}
UTIL_TraceModel((Vector *)(this_00 + 0x2e0),(Vector *)(this_00 + 0x2e0),pVVar4,pVVar3,
(CBaseEntity *)this,0,(CGameTrace *)&local_70);
if (local_39 != '\0') {
local_8c = local_8c + 1;
COutputEvent::FireOutput((COutputEvent *)(this + 0x444),this_00,(CBaseEntity *)this,0.0);
goto LAB_006f237d;
}
iVar6 = iVar6 + 1;
local_90 = local_90 + 1;
COutputEvent::FireOutput((COutputEvent *)(this + 0x45c),this_00,(CBaseEntity *)this,0.0);
} while (iVar6 <= *(int *)(gpGlobals + 0x14));
}
LAB_006f2440:
local_88 = &local_70;
uVar1 = *(undefined4 *)param_1;
local_78 = local_8c;
variant_t::Set((variant_t *)(this + 0x474),5,&local_78);
local_70 = *(undefined4 *)(this + 0x474);
local_6c = *(undefined4 *)(this + 0x478);
local_68 = *(undefined4 *)(this + 0x47c);
local_64 = *(undefined4 *)(this + 0x480);
local_60 = *(undefined4 *)(this + 0x484);
CBaseEntityOutput::FireOutput((CBaseEntityOutput *)(this + 0x474),local_88,uVar1,this,0);
uVar1 = *(undefined4 *)param_1;
local_74 = local_90;
variant_t::Set((variant_t *)(this + 0x48c),5,&local_74);
local_70 = *(undefined4 *)(this + 0x48c);
local_6c = *(undefined4 *)(this + 0x490);
local_68 = *(undefined4 *)(this + 0x494);
local_64 = *(undefined4 *)(this + 0x498);
local_60 = *(undefined4 *)(this + 0x49c);
CBaseEntityOutput::FireOutput((CBaseEntityOutput *)(this + 0x48c),local_88,uVar1,this,0);
}
return;
}
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.