IVision::IsAbleToSee
0x0075be00 · 680 bytes · __cdecl
_ZNK7IVision11IsAbleToSeeEP11CBaseEntityNS_20FieldOfViewCheckTypeEP6Vector
Decompiled
undefined (3 params)
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
/* IVision::IsAbleToSee(CBaseEntity*, IVision::FieldOfViewCheckType, Vector*) const */
undefined4 IVision::IsAbleToSee(int *param_1,undefined4 param_2,int param_3)
{
uint *puVar1;
int iVar2;
code *pcVar3;
char cVar4;
int *piVar5;
int iVar6;
undefined4 uVar7;
longdouble lVar8;
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/nextbot/nextbotvisioninterface.cpp",0x191,
&IsAbleToSee(CBaseEntity*,IVision::FieldOfViewCheckType,Vector*)::tm_fmt,"(%s)%s",
"NextBotExpensive","IVision::IsAbleToSee");
local_20 = _towlower;
}
iVar2 = _DAT_0105db00;
local_28 = local_34;
local_24 = local_30;
/* try { // try from 0075bf9e to 0075bffe has its CatchHandler @ 0075c0e4 */
if (((_DAT_0105d154 == 0) && (DAT_0105d158 != '\0')) ||
(iVar6 = ThreadGetCurrentId(), iVar2 != iVar6)) {
iVar2 = param_1[5];
}
else {
if ((char *)*_DAT_0105d15c != "IVision::IsAbleToSee") {
_DAT_0105d15c =
(int *)CVProfNode::GetSubNode((char *)_DAT_0105d15c,0xcaa168,(char *)0x0,0xca957e);
}
puVar1 = (uint *)(_DAT_0105d1e8 + 4 + _DAT_0105d15c[0x1c] * 8);
*puVar1 = *puVar1 | 4;
CVProfNode::EnterScope();
DAT_0105d158 = '\0';
iVar2 = param_1[5];
}
if (iVar2 == 0) {
uVar7 = 1;
}
else {
/* try { // try from 0075bec4 to 0075bef8 has its CatchHandler @ 0075c0c3 */
piVar5 = (int *)(**(code **)(*param_1 + 0xb0))(param_1);
pcVar3 = *(code **)(*piVar5 + 0x11c);
lVar8 = (longdouble)(**(code **)(*param_1 + 200))(param_1);
cVar4 = (*pcVar3)(piVar5,param_2,(float)lVar8);
if (cVar4 == '\0') {
/* try { // try from 0075c025 to 0075c0b9 has its CatchHandler @ 0075c0c3 */
piVar5 = (int *)(**(code **)(*param_1 + 0xb0))(param_1);
piVar5 = (int *)(**(code **)(*piVar5 + 0xb4))(piVar5);
cVar4 = (**(code **)(*piVar5 + 0x404))(piVar5,param_2);
if (((cVar4 == '\0') &&
((param_3 != 0 || (cVar4 = (**(code **)(*param_1 + 0xe4))(param_1,param_2), cVar4 != '\0')
))) && (cVar4 = (**(code **)(*param_1 + 0xd8))(param_1,param_2), cVar4 != '\0')) {
uVar7 = (**(code **)(*param_1 + 0xf8))(param_1,param_2,0);
goto LAB_0075bf03;
}
}
uVar7 = 0;
}
LAB_0075bf03:
iVar2 = _DAT_0105db00;
if (((DAT_0105d158 == '\0') || (_DAT_0105d154 != 0)) &&
(iVar6 = ThreadGetCurrentId(), iVar2 == iVar6)) {
cVar4 = CVProfNode::ExitScope();
if (cVar4 != '\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 uVar7;
}
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.