TerrorNavArea::IsPotentiallyVisibleToTeam
0x00975d90 · 597 bytes · __thiscall
_ZNK13TerrorNavArea26IsPotentiallyVisibleToTeamEi
Decompiled
undefined (2 params)
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
/* TerrorNavArea::IsPotentiallyVisibleToTeam(int) const */
undefined4 __thiscall TerrorNavArea::IsPotentiallyVisibleToTeam(TerrorNavArea *this,int param_1)
{
uint *puVar1;
char cVar2;
int *piVar3;
int iVar4;
int *piVar5;
TerrorNavArea *this_00;
undefined4 uVar6;
int iVar7;
undefined4 local_34;
undefined4 local_30;
undefined4 local_28;
undefined4 local_24;
int local_20;
local_34 = 0;
local_30 = 0;
if (_towlower == 0) {
local_20 = 0;
}
else {
(**(code **)(_towlower + 0x50))
(_towlower,&local_34,0,0,0,0,"/data/src/game/server/terror/terrornav.cpp",0x777,
&IsPotentiallyVisibleToTeam(int)::tm_fmt,"(%s)%s","ZOMBIE",
"TerrorNavArea::IsPotentiallyVisibleToTeam");
local_20 = _towlower;
}
iVar7 = _DAT_0105db00;
local_28 = local_34;
local_24 = local_30;
if ((_DAT_0105d154 != 0) || (DAT_0105d158 == '\0')) {
/* try { // try from 00975f76 to 00975fd6 has its CatchHandler @ 0097601b */
iVar4 = ThreadGetCurrentId();
if (iVar7 == iVar4) {
if ((char *)*_DAT_0105d15c != "TerrorNavArea::IsPotentiallyVisibleToTeam") {
_DAT_0105d15c =
(int *)CVProfNode::GetSubNode((char *)_DAT_0105d15c,0xd0f694,(char *)0x0,0xc0db47);
}
puVar1 = (uint *)(_DAT_0105d1e8 + 4 + _DAT_0105d15c[0x1c] * 8);
*puVar1 = *puVar1 | 4;
CVProfNode::EnterScope();
DAT_0105d158 = '\0';
}
}
/* try { // try from 00975e4a to 00975ebd has its CatchHandler @ 00975ffa */
piVar3 = (int *)GetGlobalTeam(param_1);
iVar7 = 0;
while( true ) {
iVar4 = (**(code **)(*piVar3 + 0x354))(piVar3);
if (iVar4 <= iVar7) break;
piVar5 = (int *)(**(code **)(*piVar3 + 0x358))(piVar3,iVar7);
cVar2 = (**(code **)(*piVar5 + 300))(piVar5);
if (cVar2 != '\0') {
piVar5 = (int *)(**(code **)(*piVar3 + 0x358))(piVar3,iVar7);
this_00 = (TerrorNavArea *)(**(code **)(*piVar5 + 0x52c))(piVar5);
if (this_00 != (TerrorNavArea *)0x0) {
uVar6 = IsPotentiallyVisible(this_00,this,false);
if ((char)uVar6 != '\0') goto LAB_00975ec4;
}
}
iVar7 = iVar7 + 1;
}
uVar6 = 0;
LAB_00975ec4:
iVar7 = _DAT_0105db00;
if ((DAT_0105d158 == '\0') || (_DAT_0105d154 != 0)) {
iVar4 = ThreadGetCurrentId();
if (iVar7 == iVar4) {
cVar2 = CVProfNode::ExitScope();
if (cVar2 != '\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 uVar6;
}
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.