CTerrorPlayer::ShouldCollide
0x004f1900 · 1158 bytes · __thiscall
_ZNK13CTerrorPlayer13ShouldCollideEii
Decompiled
undefined (3 params)
/* CTerrorPlayer::ShouldCollide(int, int) const */
undefined4 __thiscall CTerrorPlayer::ShouldCollide(CTerrorPlayer *this,int param_1,int param_2)
{
char cVar1;
int iVar2;
int *piVar3;
undefined4 uVar4;
uint uVar5;
uint uVar6;
undefined *puVar7;
int *piVar8;
undefined *local_24;
if (((param_1 == 5) || (param_1 == 8)) && (*(int *)(ZombieAvoidTeammates._28_4_ + 0x30) != 0)) {
cVar1 = (**(code **)(*(int *)this + 0x558))(this);
if (cVar1 != '\0') {
return 0;
}
iVar2 = CBaseEntity::GetTeamNumber((CBaseEntity *)this);
if (iVar2 == 3) {
if ((param_2 & 0x800U) == 0) {
return 0;
}
uVar6 = *(uint *)(this + 0x3e64);
if ((((uVar6 != 0xffffffff) &&
(puVar7 = g_pEntityList + (uVar6 & 0xfff) * 0x10, puVar7 != (undefined *)0xfffffffc)) &&
((*(uint *)(puVar7 + 8) == uVar6 >> 0xc && (*(int *)(puVar7 + 4) != 0)))) ||
(cVar1 = IsGettingUp(this), cVar1 != '\0')) {
uVar6 = param_2 & 0x1000;
joined_r0x004f1cf5:
if (uVar6 == 0) {
return 0;
}
}
}
else if ((iVar2 == 4) || (iVar2 == 2)) {
if ((param_2 & 0x1000U) == 0) {
return 0;
}
uVar6 = *(uint *)(this + 0x3e68);
if (((((uVar6 != 0xffffffff) &&
(puVar7 = g_pEntityList + (uVar6 & 0xfff) * 0x10, puVar7 != (undefined *)0xfffffffc)) &&
(*(uint *)(puVar7 + 8) == uVar6 >> 0xc)) && (*(int *)(puVar7 + 4) != 0)) ||
(cVar1 = IsGettingUp(this), cVar1 != '\0')) {
uVar6 = param_2 & 0x800;
goto joined_r0x004f1cf5;
}
}
piVar3 = (int *)(**(code **)(*(int *)g_pGameMovement + 0x2c))(g_pGameMovement);
if ((piVar3 != (int *)0x0) && (cVar1 = (**(code **)(*piVar3 + 0x16c))(piVar3), cVar1 != '\0')) {
local_24 = g_pEntityList;
uVar6 = piVar3[0xf9a];
if (uVar6 == 0xffffffff) {
LAB_004f1b04:
uVar5 = piVar3[0xf92];
if (((((uVar5 == 0xffffffff) ||
(puVar7 = g_pEntityList + (uVar5 & 0xfff) * 0x10, puVar7 == (undefined *)0xfffffffc))
|| (*(uint *)(puVar7 + 8) != uVar5 >> 0xc)) || (*(int *)(puVar7 + 4) == 0)) &&
(((uVar5 = piVar3[0xcf1], uVar5 == 0xffffffff ||
(puVar7 = g_pEntityList + (uVar5 & 0xfff) * 0x10, puVar7 == (undefined *)0xfffffffc))
|| ((*(uint *)(puVar7 + 8) != uVar5 >> 0xc ||
((*(int *)(puVar7 + 4) == 0 || (*(char *)((int)piVar3 + 0x39f1) != '\0')))))))) {
cVar1 = (**(code **)(*piVar3 + 0x7e8))(piVar3);
if (cVar1 != '\0') {
return 0;
}
uVar6 = piVar3[0xf9a];
}
if (((uVar6 == 0xffffffff) ||
(piVar8 = (int *)(g_pEntityList + (uVar6 & 0xfff) * 0x10 + 4), piVar8 == (int *)0x0)) ||
(local_24 = g_pEntityList, piVar8[1] != uVar6 >> 0xc)) goto LAB_004f192d;
}
else {
uVar5 = uVar6 & 0xfff;
piVar8 = (int *)(g_pEntityList + uVar5 * 0x10 + 4);
if (((piVar8 == (int *)0x0) || (*(uint *)(g_pEntityList + uVar5 * 0x10 + 8) != uVar6 >> 0xc)
) || (*(int *)(g_pEntityList + uVar5 * 0x10 + 4) == 0)) goto LAB_004f1b04;
}
g_pEntityList = local_24;
if (((*piVar8 != 0) && (uVar6 = *(uint *)(this + 0x3e64), uVar6 != 0xffffffff)) &&
((puVar7 = local_24 + (uVar6 & 0xfff) * 0x10, puVar7 != (undefined *)0xfffffffc &&
((*(uint *)(puVar7 + 8) == uVar6 >> 0xc && (piVar3 == *(int **)(puVar7 + 4))))))) {
return 0;
}
}
}
LAB_004f192d:
uVar6 = *(uint *)(this + 0x3e68);
if ((((((uVar6 == 0xffffffff) ||
(puVar7 = g_pEntityList + (uVar6 & 0xfff) * 0x10, puVar7 == (undefined *)0xfffffffc)) ||
(*(uint *)(puVar7 + 8) != uVar6 >> 0xc)) || (*(int *)(puVar7 + 4) == 0)) &&
(((uVar6 = *(uint *)(this + 0x3e48), uVar6 == 0xffffffff ||
(puVar7 = g_pEntityList + (uVar6 & 0xfff) * 0x10, puVar7 == (undefined *)0xfffffffc)) ||
((*(uint *)(puVar7 + 8) != uVar6 >> 0xc || (*(int *)(puVar7 + 4) == 0)))))) &&
((((uVar6 = *(uint *)(this + 0x33c4), uVar6 == 0xffffffff ||
(puVar7 = g_pEntityList + (uVar6 & 0xfff) * 0x10, puVar7 == (undefined *)0xfffffffc)) ||
((*(uint *)(puVar7 + 8) != uVar6 >> 0xc ||
((*(int *)(puVar7 + 4) == 0 || (this[0x39f1] != (CTerrorPlayer)0x0)))))) &&
(cVar1 = (**(code **)(*(int *)this + 0x7e8))(this), cVar1 != '\0')))) {
iVar2 = CBaseEntity::GetTeamNumber((CBaseEntity *)this);
cVar1 = IsASurvivorTeam(iVar2);
if (cVar1 == '\0') goto LAB_004f1bd8;
piVar3 = (int *)(**(code **)(*(int *)g_pGameMovement + 0x2c))(g_pGameMovement);
if ((piVar3 == (int *)0x0) || (cVar1 = (**(code **)(*piVar3 + 0x16c))(piVar3), cVar1 == '\0')) {
(**(code **)(*(int *)g_pGameMovement + 0x28))(g_pGameMovement);
}
else {
iVar2 = piVar3[0xf9e];
cVar1 = (**(code **)(*(int *)g_pGameMovement + 0x28))(g_pGameMovement);
if ((cVar1 == '\0') && ((char)iVar2 != '\0')) goto LAB_004f1a31;
}
}
else {
LAB_004f1bd8:
cVar1 = (**(code **)(*(int *)g_pGameMovement + 0x28))(g_pGameMovement);
if (cVar1 == '\0') goto LAB_004f1a31;
}
if ((param_2 & 0x30000U) != 0) {
return 0;
}
LAB_004f1a31:
uVar4 = CBaseEntity::ShouldCollide((CBaseEntity *)this,param_1,param_2);
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.