CBaseEntity::FVisible
0x00603310 · 1336 bytes · __thiscall
_ZN11CBaseEntity8FVisibleEPS_iPS0_
Decompiled
undefined (4 params)
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
/* CBaseEntity::FVisible(CBaseEntity*, int, CBaseEntity**) */
undefined4 __thiscall
CBaseEntity::FVisible(CBaseEntity *this,CBaseEntity *param_1,int param_2,CBaseEntity **param_3)
{
code *pcVar1;
int iVar2;
CBaseEntity *pCVar3;
char cVar4;
CBaseEntity *pCVar5;
int iVar6;
int iVar7;
int *piVar8;
undefined4 uVar9;
float local_144;
float local_140;
float local_13c;
float local_138;
float local_134;
float local_130;
CTraceFilterSimple local_12c [16];
CTraceFilterLOS local_11c [16];
float local_10c;
float local_108;
float local_104;
undefined4 local_fc;
undefined4 local_f8;
undefined4 local_f4;
undefined4 local_ec;
undefined4 local_e8;
undefined4 local_e4;
undefined4 local_dc;
undefined1 local_d8;
undefined1 local_d7;
float local_bc;
float local_b8;
float local_b4;
undefined4 local_ac;
undefined4 local_a8;
undefined4 local_a4;
undefined4 local_9c;
undefined4 local_98;
undefined4 local_94;
undefined4 local_8c;
undefined1 local_88;
undefined1 local_87;
Vector local_70 [12];
Vector local_64 [32];
float local_44;
char local_39;
CBaseEntity *local_24;
if (___atan2f_finite == 0) {
iVar7 = 0;
}
else {
(**(code **)(___atan2f_finite + 0x50))();
iVar7 = ___atan2f_finite;
}
iVar2 = _DAT_0105db00;
/* try { // try from 0060367b to 006036cd has its CatchHandler @ 0060388e */
if (((_DAT_0105d154 != 0) || (DAT_0105d158 == '\0')) &&
(iVar6 = ThreadGetCurrentId(), iVar2 == iVar6)) {
if ((char *)*_DAT_0105d15c != "CBaseEntity::FVisible") {
_DAT_0105d15c =
(int *)CVProfNode::GetSubNode((char *)_DAT_0105d15c,0xc5c0e6,(char *)0x1,0xbfafa1);
}
CVProfNode::EnterScope();
DAT_0105d158 = '\0';
}
piVar8 = (int *)&stack0xfffffe64;
if (((byte)param_1[0x151] & 0x80) == 0) {
/* try { // try from 00603400 to 006035ec has its CatchHandler @ 0060386a */
(**(code **)(*(int *)this + 0x234))();
(**(code **)(*(int *)param_1 + 0x234))();
piVar8 = (int *)&stack0xfffffe5c;
if (*(int *)(ai_LOS_mode._28_4_ + 0x30) == 0) {
(**(code **)(*(int *)this + 0x16c))();
CTraceFilterLOS::CTraceFilterLOS(local_11c,(IHandleEntity *)this,0,(IHandleEntity *)param_1);
local_88 = 1;
local_8c = 0;
local_b8 = local_134 - local_140;
local_b4 = local_130 - local_13c;
local_bc = local_138 - local_144;
local_94 = 0;
local_98 = 0;
local_9c = 0;
local_87 = local_b8 * local_b8 + local_b4 * local_b4 + local_bc * local_bc != 0.0;
local_a4 = 0;
local_a8 = 0;
local_ac = 0;
(**(code **)(*enginetrace + 0x14))();
}
else {
local_10c = local_138 - local_144;
local_dc = 0;
local_104 = local_130 - local_13c;
local_d8 = 1;
local_108 = local_134 - local_140;
local_e4 = 0;
local_e8 = 0;
local_ec = 0;
local_d7 = local_104 * local_104 + local_10c * local_10c + local_108 * local_108 != 0.0;
local_f4 = 0;
local_f8 = 0;
local_fc = 0;
/* try { // try from 00603823 to 00603853 has its CatchHandler @ 0060386a */
CTraceFilterSimple::CTraceFilterSimple
(local_12c,(IHandleEntity *)this,0,(_func_bool_IHandleEntity_ptr_int *)0x0);
(**(code **)(*enginetrace + 0x14))();
}
if (*(int *)(r_visualizetraces._28_4_ + 0x30) != 0) {
DebugDrawLine(local_70,local_64,0xff,0,0,true,-1.0);
}
if (((local_44 == 1.0) && (local_39 == '\0')) ||
((local_24 == param_1 ||
((cVar4 = (**(code **)(*(int *)param_1 + 0x16c))(), pCVar3 = local_24, cVar4 != '\0' &&
(pCVar5 = (CBaseEntity *)(**(code **)(*(int *)param_1 + 0x504))(), pCVar3 == pCVar5)))))) {
uVar9 = 1;
goto LAB_00603606;
}
piVar8 = (int *)&stack0xfffffe5c;
if (param_3 != (CBaseEntity **)0x0) {
*param_3 = local_24;
piVar8 = (int *)&stack0xfffffe5c;
}
}
uVar9 = 0;
LAB_00603606:
iVar2 = _DAT_0105db00;
if ((DAT_0105d158 == '\0') || (_DAT_0105d154 != 0)) {
piVar8[-1] = 0x6036eb;
iVar6 = ThreadGetCurrentId();
if (iVar2 == iVar6) {
*piVar8 = (int)_DAT_0105d15c;
piVar8[-1] = 0x603700;
cVar4 = CVProfNode::ExitScope();
if (cVar4 != '\0') {
_DAT_0105d15c = (int *)_DAT_0105d15c[0x19];
}
DAT_0105d158 = _DAT_0105d15c == (int *)0x105d160;
}
}
if (iVar7 != 0) {
piVar8[5] = 0;
piVar8[4] = 0;
piVar8[3] = 0;
*piVar8 = iVar7;
piVar8[1] = 0;
piVar8[2] = 0;
pcVar1 = *(code **)(iVar7 + 0x54);
piVar8[-1] = 0x60365c;
(*pcVar1)();
}
return uVar9;
}
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.