ClosestVisibleHelplessSurvivorScan::operator()
0x00a7a3d0 · 792 bytes · __thiscall
_ZN34ClosestVisibleHelplessSurvivorScanclEP13CTerrorPlayer
Decompiled
undefined (2 params)
/* ClosestVisibleHelplessSurvivorScan::TEMPNAMEPLACEHOLDERVALUE(CTerrorPlayer*) */
undefined4 __thiscall
ClosestVisibleHelplessSurvivorScan::operator()
(ClosestVisibleHelplessSurvivorScan *this,CTerrorPlayer *param_1)
{
uint uVar1;
char cVar2;
int iVar3;
float *pfVar4;
undefined *puVar5;
float fVar6;
undefined **local_dc [4];
float local_cc;
float local_c8;
float local_c4;
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;
if (((((*(CTerrorPlayer **)(this + 0x14) != param_1) &&
(cVar2 = (**(code **)(*(int *)param_1 + 300))(param_1), cVar2 != '\0')) &&
(iVar3 = CBaseEntity::GetTeamNumber((CBaseEntity *)param_1), iVar3 == 2)) &&
((this[0x18] == (ClosestVisibleHelplessSurvivorScan)0x0 ||
(((cVar2 = (**(code **)(*(int *)param_1 + 0x7e8))(param_1), cVar2 == '\0' &&
((((uVar1 = *(uint *)(param_1 + 0x3e68), uVar1 == 0xffffffff ||
(puVar5 = g_pEntityList + (uVar1 & 0xfff) * 0x10, puVar5 == (undefined *)0xfffffffc)) ||
((*(uint *)(puVar5 + 8) != uVar1 >> 0xc || (*(int *)(puVar5 + 4) == 0)))) &&
((cVar2 = CTerrorPlayer::IsTongueVictim(param_1), cVar2 == '\0' &&
(cVar2 = CTerrorPlayer::IsPummelVictim(param_1), cVar2 == '\0')))))) &&
(cVar2 = CTerrorPlayer::IsJockeyVictim(param_1), cVar2 == '\0')))))) &&
(((this[0x19] == (ClosestVisibleHelplessSurvivorScan)0x0 ||
(iVar3 = (**(code **)(*(int *)param_1 + 0x52c))(param_1), iVar3 == 0)) ||
((*(byte *)(iVar3 + 0x12d) & 0x80) == 0)))) {
pfVar4 = (float *)(**(code **)(*(int *)param_1 + 0x288))(param_1);
fVar6 = SQRT((*pfVar4 - *(float *)this) * (*pfVar4 - *(float *)this) +
(pfVar4[1] - *(float *)(this + 4)) * (pfVar4[1] - *(float *)(this + 4)) +
(pfVar4[2] - *(float *)(this + 8)) * (pfVar4[2] - *(float *)(this + 8)));
cVar2 = CTerrorPlayer::IsGettingUp(param_1);
if (cVar2 != '\0') {
fVar6 = fVar6 * 0.5;
}
if (fVar6 * fVar6 < *(float *)(this + 0x10)) {
CTraceFilterSimple::CTraceFilterSimple
((CTraceFilterSimple *)local_dc,(IHandleEntity *)0x0,0,
IgnoreActorsTraceFilterFunction);
local_dc[0] = &PTR_ShouldHitEntity_00c23430;
pfVar4 = (float *)(**(code **)(*(int *)param_1 + 0x288))(param_1);
local_cc = *(float *)this;
local_c8 = *(float *)(this + 4);
local_bc = *pfVar4 - local_cc;
local_c4 = *(float *)(this + 8);
local_b8 = pfVar4[1] - local_c8;
local_88 = 1;
local_8c = 0;
local_b4 = pfVar4[2] - local_c4;
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))
(enginetrace,&local_cc,0x2006041,(CTraceFilterSimple *)local_dc,local_70);
if (*(int *)(r_visualizetraces._28_4_ + 0x30) != 0) {
DebugDrawLine(local_70,local_64,0xff,0,0,true,-1.0);
}
if ((1.0 <= local_44) && (local_39 == '\0')) {
*(float *)(this + 0x10) = fVar6 * fVar6;
*(CTerrorPlayer **)(this + 0xc) = param_1;
}
}
}
return 1;
}
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.