TongueTargetScan<CTerrorPlayer>::IsTargetVisible
0x00847cd0 · 796 bytes · __thiscall
_ZNK16TongueTargetScanI13CTerrorPlayerE15IsTargetVisibleEPS0_
Decompiled
undefined (2 params)
/* TongueTargetScan<CTerrorPlayer>::IsTargetVisible(CTerrorPlayer*) const */
undefined1 __thiscall
TongueTargetScan<CTerrorPlayer>::IsTargetVisible
(TongueTargetScan<CTerrorPlayer> *this,CTerrorPlayer *param_1)
{
int iVar1;
code *pcVar2;
int *piVar3;
undefined1 uVar4;
char cVar5;
undefined4 *puVar6;
float local_12c;
float local_128;
float local_124;
float local_120;
float local_11c;
float local_118;
undefined **local_114 [4];
undefined4 local_104 [3];
undefined4 local_f8;
undefined4 local_f4;
undefined **local_f0 [4];
undefined4 local_e0 [3];
undefined4 local_d4;
undefined4 local_d0;
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;
CTerrorPlayer *local_24;
piVar3 = mdlcache;
puVar6 = (undefined4 *)&stack0xfffffea4;
(**(code **)(*mdlcache + 0x68))();
if (*(int *)(target_scan_use_query_cache._28_4_ + 0x30) == 0) {
/* try { // try from 00847d81 to 00847d85 has its CatchHandler @ 00848000 */
CTraceFilterSimpleList::CTraceFilterSimpleList((CTraceFilterSimpleList *)local_114,0);
local_114[0] = &PTR_ShouldHitEntity_00c2e780;
/* try { // try from 00847da1 to 00847da5 has its CatchHandler @ 00848046 */
CTraceFilterSimpleList::CTraceFilterSimpleList((CTraceFilterSimpleList *)local_f0,0);
local_f0[0] = &PTR_ShouldHitEntity_00cd7c10;
/* try { // try from 00847db0 to 00847fdd has its CatchHandler @ 00848012 */
cVar5 = CTerrorGameRules::HasPlayerControlledZombies();
if (cVar5 == '\0') {
CTraceFilterSimpleList::AddEntityToIgnore
((CTraceFilterSimpleList *)local_114,*(IHandleEntity **)(this + 4));
}
else {
CTraceFilterSimpleList::AddEntityToIgnore
((CTraceFilterSimpleList *)local_f0,*(IHandleEntity **)(this + 4));
}
(**(code **)(*(int *)param_1 + 0x234))();
(**(code **)(**(int **)(this + 4) + 0x234))();
puVar6 = (undefined4 *)&stack0xfffffe9c;
local_88 = 1;
local_bc = local_120 - local_12c;
local_8c = 0;
local_b8 = local_11c - local_128;
local_b4 = local_118 - local_124;
local_94 = 0;
local_98 = 0;
local_9c = 0;
local_87 = local_b8 * local_b8 + local_bc * local_bc + local_b4 * local_b4 != 0.0;
local_a4 = 0;
local_a8 = 0;
local_ac = 0;
(**(code **)(*enginetrace + 0x14))();
if (*(int *)(r_visualizetraces._28_4_ + 0x30) != 0) {
DebugDrawLine(local_70,local_64,0xff,0,0,true,-1.0);
}
uVar4 = 1.0 <= local_44 || param_1 == local_24;
local_f0[0] = &PTR_ShouldHitEntity_00c54590;
local_d4 = 0;
CUtlMemory<IHandleEntity*,int>::Purge((CUtlMemory<IHandleEntity*,int> *)local_e0);
local_d0 = local_e0[0];
CUtlMemory<IHandleEntity*,int>::Purge((CUtlMemory<IHandleEntity*,int> *)local_e0);
local_114[0] = &PTR_ShouldHitEntity_00c54590;
local_f8 = 0;
CUtlMemory<IHandleEntity*,int>::Purge((CUtlMemory<IHandleEntity*,int> *)local_104);
local_f4 = local_104[0];
CUtlMemory<IHandleEntity*,int>::Purge((CUtlMemory<IHandleEntity*,int> *)local_104);
}
else {
/* try { // try from 00847cf9 to 00847d56 has its CatchHandler @ 00848000 */
CTerrorGameRules::HasPlayerControlledZombies();
uVar4 = IsLineOfSightBetweenTwoEntitiesClear();
}
iVar1 = *piVar3;
*puVar6 = piVar3;
pcVar2 = *(code **)(iVar1 + 0x6c);
puVar6[-1] = 0x847d61;
(*pcVar2)();
return uVar4;
}
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.