ChargeTargetScan<CTerrorPlayer>::IsTargetVisible
0x004d6c70 · 649 bytes · __thiscall
_ZNK16ChargeTargetScanI13CTerrorPlayerE15IsTargetVisibleEPS0_
Decompiled
undefined (2 params)
/* ChargeTargetScan<CTerrorPlayer>::IsTargetVisible(CTerrorPlayer*) const */
undefined1 __thiscall
ChargeTargetScan<CTerrorPlayer>::IsTargetVisible
(ChargeTargetScan<CTerrorPlayer> *this,CTerrorPlayer *param_1)
{
int iVar1;
code *pcVar2;
int *piVar3;
undefined1 uVar4;
undefined4 *puVar5;
float local_108;
float local_104;
float local_100;
float local_fc;
float local_f8;
float 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;
puVar5 = (undefined4 *)&stack0xfffffec4;
(**(code **)(*mdlcache + 0x68))();
if (*(int *)(target_scan_use_query_cache._28_4_ + 0x30) == 0) {
/* try { // try from 004d6d11 to 004d6d15 has its CatchHandler @ 004d6f05 */
CTraceFilterSimpleList::CTraceFilterSimpleList((CTraceFilterSimpleList *)local_f0,0);
local_f0[0] = &PTR_ShouldHitEntity_00c2e780;
/* try { // try from 004d6d2a to 004d6ea2 has its CatchHandler @ 004d6f17 */
CTraceFilterSimpleList::AddEntityToIgnore
((CTraceFilterSimpleList *)local_f0,*(IHandleEntity **)(this + 4));
(**(code **)(*(int *)param_1 + 0x234))();
(**(code **)(**(int **)(this + 4) + 0x234))();
puVar5 = (undefined4 *)&stack0xfffffebc;
local_88 = 1;
local_bc = local_fc - local_108;
local_8c = 0;
local_b8 = local_f8 - local_104;
local_b4 = local_f4 - local_100;
local_94 = 0;
local_98 = 0;
local_9c = 0;
local_87 = local_bc * local_bc + local_b8 * local_b8 + 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);
}
else {
/* try { // try from 004d6ce2 to 004d6ce6 has its CatchHandler @ 004d6f05 */
uVar4 = IsLineOfSightBetweenTwoEntitiesClear();
}
iVar1 = *piVar3;
*puVar5 = piVar3;
pcVar2 = *(code **)(iVar1 + 0x6c);
puVar5[-1] = 0x4d6cf1;
(*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.