CUseTraceFilter::ShouldHitEntity
0x0051c4b0 · 554 bytes · __thiscall
_ZN15CUseTraceFilter15ShouldHitEntityEP13IHandleEntityi
Decompiled
undefined (3 params)
/* CUseTraceFilter::ShouldHitEntity(IHandleEntity*, int) */
uint __thiscall
CUseTraceFilter::ShouldHitEntity(CUseTraceFilter *this,IHandleEntity *param_1,int param_2)
{
uint uVar1;
int *piVar2;
char cVar3;
byte bVar4;
uint uVar5;
int iVar6;
undefined *puVar7;
uVar5 = CTraceFilterSimpleListNoGhosts::ShouldHitEntity
((CTraceFilterSimpleListNoGhosts *)this,param_1,param_2);
if ((char)uVar5 == '\0') {
return uVar5;
}
cVar3 = (**(code **)(*staticpropmgr + 8))(staticpropmgr,param_1);
if (cVar3 != '\0') {
return uVar5;
}
if (param_1 == (IHandleEntity *)0x0) {
return uVar5;
}
cVar3 = (**(code **)(*(int *)param_1 + 0x16c))(param_1);
if (cVar3 != '\0') {
cVar3 = (**(code **)(*(int *)param_1 + 0x558))(param_1);
if (((cVar3 == '\0') && (cVar3 = (**(code **)(*(int *)param_1 + 300))(param_1), cVar3 != '\0'))
&& (*(CBaseEntity **)(this + 0x24) != (CBaseEntity *)0x0)) {
iVar6 = CBaseEntity::GetTeamNumber(*(CBaseEntity **)(this + 0x24));
cVar3 = IsASurvivorTeam(iVar6);
if (cVar3 != '\0') {
iVar6 = CBaseEntity::GetTeamNumber((CBaseEntity *)param_1);
bVar4 = IsASurvivorTeam(iVar6);
if (bVar4 != 0) {
uVar5 = *(uint *)(param_1 + 0x3e68);
if (((((uVar5 == 0xffffffff) ||
(puVar7 = g_pEntityList + (uVar5 & 0xfff) * 0x10, puVar7 == (undefined *)0xfffffffc)
) || ((*(uint *)(puVar7 + 8) != uVar5 >> 0xc || (*(int *)(puVar7 + 4) == 0)))) &&
((((uVar5 = *(uint *)(param_1 + 0x3e48), uVar5 == 0xffffffff ||
(puVar7 = g_pEntityList + (uVar5 & 0xfff) * 0x10, puVar7 == (undefined *)0xfffffffc
)) || ((*(uint *)(puVar7 + 8) != uVar5 >> 0xc || (*(int *)(puVar7 + 4) == 0)))) &&
((((uVar5 = *(uint *)(param_1 + 0x33c4), uVar5 == 0xffffffff ||
(puVar7 = g_pEntityList + (uVar5 & 0xfff) * 0x10,
puVar7 == (undefined *)0xfffffffc)) || (*(uint *)(puVar7 + 8) != uVar5 >> 0xc)) ||
((*(int *)(puVar7 + 4) == 0 || (param_1[0x39f1] != (IHandleEntity)0x0)))))))) &&
(uVar5 = (**(code **)(*(int *)param_1 + 0x7e8))(param_1), (char)uVar5 != '\0')) {
uVar1 = *(uint *)(param_1 + 0x2e24);
if ((((uVar1 != 0xffffffff) &&
(puVar7 = g_pEntityList + (uVar1 & 0xfff) * 0x10, puVar7 != (undefined *)0xfffffffc
)) && (*(uint *)(puVar7 + 8) == uVar1 >> 0xc)) &&
(iVar6 = *(int *)(puVar7 + 4), iVar6 != 0)) {
uVar5 = CONCAT31((int3)((uint)iVar6 >> 8),*(int *)(this + 0x24) == iVar6);
}
}
else {
piVar2 = *(int **)(this + 0x28);
if (piVar2 == (int *)0x0) {
return 0;
}
iVar6 = (**(code **)(*piVar2 + 0x638))(piVar2);
if (((iVar6 != 0xf) &&
(iVar6 = (**(code **)(**(int **)(this + 0x28) + 0x638))(*(int **)(this + 0x28)),
iVar6 != 0xc)) &&
(iVar6 = (**(code **)(**(int **)(this + 0x28) + 0x638))(*(int **)(this + 0x28)),
iVar6 != 0x17)) {
return 0;
}
uVar5 = (uint)bVar4;
}
return uVar5;
}
}
}
return 0;
}
return uVar5;
}
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.