HulkSmashableEnumerator::EnumElement
0x00562d50 · 4264 bytes · __thiscall
_ZN23HulkSmashableEnumerator11EnumElementEP13IHandleEntity
Decompiled
undefined (2 params)
/* HulkSmashableEnumerator::EnumElement(IHandleEntity*) */
undefined4 __thiscall
HulkSmashableEnumerator::EnumElement(HulkSmashableEnumerator *this,IHandleEntity *param_1)
{
uint uVar1;
IHandleEntity *pIVar2;
code *pcVar3;
int *piVar4;
char cVar5;
uint *puVar6;
CBaseEntity *this_00;
float *pfVar7;
int iVar8;
CBaseEntity **ppCVar9;
int iVar10;
undefined *puVar11;
int *piVar12;
CBaseEntity *pCVar13;
float fVar14;
CBaseEntity *local_13c;
CBaseEntity *local_138;
CBaseEntity *local_134;
CBaseEntity *local_130;
CBaseEntity *local_12c;
CBaseEntity *local_128;
float local_124;
float local_120;
float local_11c;
float local_118;
float local_114;
float local_110;
undefined4 local_10c;
undefined4 local_108;
undefined4 local_104;
float local_100;
float local_fc;
float local_f8;
undefined1 local_f4 [12];
float local_e8;
float local_e4;
float local_e0;
float local_dc;
float local_d8;
float local_d4;
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;
float local_70;
float local_6c;
float local_68;
Vector local_64 [32];
float local_44;
CBaseEntity *local_24;
puVar6 = (uint *)(**(code **)(*(int *)param_1 + 0xc))();
uVar1 = *puVar6;
if (uVar1 == 0xffffffff) {
return 0;
}
iVar10 = (uVar1 & 0xfff) * 0x10;
if (*(uint *)(gEntList + iVar10 + 8) != uVar1 >> 0xc) {
return 0;
}
if (*(int **)(gEntList + iVar10 + 4) == (int *)0x0) {
return 0;
}
this_00 = (CBaseEntity *)(**(code **)(**(int **)(gEntList + iVar10 + 4) + 0x18))();
if (this_00 == (CBaseEntity *)0x0) {
return 0;
}
if (*(CBaseEntity **)(this + 4) == this_00) {
return 0;
}
(**(code **)(*(int *)*(CBaseEntity **)(this + 4) + 0x234))();
local_10c = *(undefined4 *)(this + 0x10);
local_108 = *(undefined4 *)(this + 0x14);
local_104 = *(undefined4 *)(this + 0x18);
AngleVectors((QAngle *)&local_10c,(Vector *)&local_118);
(**(code **)(**(int **)(this + 4) + 0x234))();
pfVar7 = (float *)(**(code **)(*(int *)this_00 + 0x288))();
local_fc = pfVar7[1] - local_6c;
local_f8 = pfVar7[2] - local_68;
local_100 = *pfVar7 - local_70;
VectorNormalize((Vector *)&local_100);
if (local_114 * local_fc + local_118 * local_100 + local_110 * local_f8 < 0.0) {
return 0;
}
pIVar2 = *(IHandleEntity **)(this + 4);
pfVar7 = (float *)(**(code **)(*(int *)this_00 + 0x288))();
local_bc = *pfVar7 - local_124;
local_b8 = pfVar7[1] - local_120;
local_b4 = pfVar7[2] - local_11c;
local_94 = 0;
local_98 = 0;
local_9c = 0;
local_a4 = 0;
local_a8 = 0;
local_ac = 0;
local_cc = local_124;
local_c8 = local_120;
local_c4 = local_11c;
local_8c = 0;
local_87 = local_b8 * local_b8 + local_b4 * local_b4 + local_bc * local_bc != 0.0;
local_88 = 1;
CTraceFilterSimple::CTraceFilterSimple
((CTraceFilterSimple *)&local_dc,pIVar2,0,(_func_bool_IHandleEntity_ptr_int *)0x0);
(**(code **)(*enginetrace + 0x14))();
if (*(int *)(r_visualizetraces._28_4_ + 0x30) != 0) {
DebugDrawLine((Vector *)&local_70,local_64,0xff,0,0,true,-1.0);
}
piVar12 = (int *)&stack0xfffffe8c;
if ((((local_44 != 1.0) && (piVar12 = (int *)&stack0xfffffe8c, local_24 != this_00)) &&
(piVar12 = (int *)&stack0xfffffe8c, local_24 != (CBaseEntity *)0x0)) &&
(((uVar1 = *(uint *)(local_24 + 0x188), uVar1 == 0xffffffff ||
(puVar11 = g_pEntityList + (uVar1 & 0xfff) * 0x10, puVar11 == (undefined *)0xfffffffc)) ||
((*(uint *)(puVar11 + 8) != uVar1 >> 0xc ||
(piVar12 = (int *)&stack0xfffffe8c, *(CBaseEntity **)(puVar11 + 4) != this_00)))))) {
cVar5 = (**(code **)(*(int *)this_00 + 0x16c))();
if (cVar5 == '\0') {
return 0;
}
pIVar2 = *(IHandleEntity **)(this + 4);
if (((byte)this_00[0x14d] & 8) != 0) {
CBaseEntity::CalcAbsolutePosition(this_00);
}
local_bc = *(float *)(this_00 + 0x2e0) - local_124;
local_b8 = *(float *)(this_00 + 0x2e4) - local_120;
local_b4 = *(float *)(this_00 + 0x2e8) - local_11c;
local_cc = local_124;
local_c8 = local_120;
local_c4 = local_11c;
local_94 = 0;
local_98 = 0;
local_9c = 0;
local_8c = 0;
local_87 = local_bc * local_bc + local_b8 * local_b8 + local_b4 * local_b4 != 0.0;
local_88 = 1;
local_a4 = 0;
local_a8 = 0;
local_ac = 0;
CTraceFilterSimple::CTraceFilterSimple
((CTraceFilterSimple *)&local_dc,pIVar2,0,(_func_bool_IHandleEntity_ptr_int *)0x0);
(**(code **)(*enginetrace + 0x14))();
if (*(int *)(r_visualizetraces._28_4_ + 0x30) != 0) {
DebugDrawLine((Vector *)&local_70,local_64,0xff,0,0,true,-1.0);
}
piVar12 = (int *)&stack0xfffffe8c;
if (((local_44 != 1.0) && (piVar12 = (int *)&stack0xfffffe8c, local_24 != this_00)) &&
((piVar12 = (int *)&stack0xfffffe8c, local_24 != (CBaseEntity *)0x0 &&
((((uVar1 = *(uint *)(local_24 + 0x188), uVar1 == 0xffffffff ||
(puVar11 = g_pEntityList + (uVar1 & 0xfff) * 0x10, puVar11 == (undefined *)0xfffffffc))
|| (*(uint *)(puVar11 + 8) != uVar1 >> 0xc)) ||
(piVar12 = (int *)&stack0xfffffe8c, *(CBaseEntity **)(puVar11 + 4) != this_00)))))) {
pIVar2 = *(IHandleEntity **)(this + 4);
(**(code **)(*(int *)this_00 + 0x234))();
local_94 = 0;
local_bc = local_e8 - local_124;
local_b8 = local_e4 - local_120;
local_cc = local_124;
local_c8 = local_120;
local_b4 = local_e0 - local_11c;
local_c4 = local_11c;
local_98 = 0;
local_9c = 0;
local_8c = 0;
local_88 = 1;
local_a4 = 0;
local_a8 = 0;
local_ac = 0;
local_87 = local_bc * local_bc + local_b8 * local_b8 + local_b4 * local_b4 != 0.0;
CTraceFilterSimple::CTraceFilterSimple
((CTraceFilterSimple *)&local_dc,pIVar2,0,(_func_bool_IHandleEntity_ptr_int *)0x0);
(**(code **)(*enginetrace + 0x14))();
if (*(int *)(r_visualizetraces._28_4_ + 0x30) != 0) {
DebugDrawLine((Vector *)&local_70,local_64,0xff,0,0,true,-1.0);
}
piVar12 = (int *)&stack0xfffffe88;
if (((local_44 != 1.0) && (piVar12 = (int *)&stack0xfffffe88, local_24 != this_00)) &&
(piVar12 = (int *)&stack0xfffffe88, local_24 != (CBaseEntity *)0x0)) {
uVar1 = *(uint *)(local_24 + 0x188);
if (uVar1 == 0xffffffff) {
return 0;
}
puVar11 = g_pEntityList + (uVar1 & 0xfff) * 0x10;
if (puVar11 == (undefined *)0xfffffffc) {
return 0;
}
if (*(uint *)(puVar11 + 8) != uVar1 >> 0xc) {
return 0;
}
piVar12 = (int *)&stack0xfffffe88;
if (*(CBaseEntity **)(puVar11 + 4) != this_00) {
return 0;
}
}
}
}
iVar10 = *(int *)this_00;
*piVar12 = (int)this_00;
pcVar3 = *(code **)(iVar10 + 0x16c);
piVar12[-1] = 0x5634bb;
cVar5 = (*pcVar3)();
if (cVar5 != '\0') {
iVar10 = *(int *)this_00;
*piVar12 = (int)this_00;
pcVar3 = *(code **)(iVar10 + 0x16c);
piVar12[-1] = 0x56367d;
cVar5 = (*pcVar3)();
pCVar13 = (CBaseEntity *)0x0;
if (cVar5 != '\0') {
pCVar13 = this_00;
}
*piVar12 = (int)pCVar13;
piVar12[-1] = 0x56368a;
iVar10 = CBaseEntity::GetTeamNumber((CBaseEntity *)*piVar12);
if (iVar10 == 3) {
iVar10 = *(int *)pCVar13;
*piVar12 = (int)pCVar13;
pcVar3 = *(code **)(iVar10 + 0x544);
piVar12[-1] = 0x56369e;
iVar10 = (*pcVar3)();
if (iVar10 == 7) {
return 0;
}
}
}
*piVar12 = (int)this_00;
piVar12[-1] = 0x5634cb;
cVar5 = IsPushableEntity((CBaseEntity *)*piVar12);
if (cVar5 == '\0') {
*piVar12 = (int)this_00;
piVar12[-1] = 0x5634db;
cVar5 = IsPushAwayEntity((CBaseEntity *)*piVar12);
if (cVar5 == '\0') {
piVar12[3] = 0;
piVar12[2] = 0;
piVar12[1] = 1;
*piVar12 = (int)this_00;
piVar12[-1] = 0x563503;
cVar5 = IsBreakableEntity((CBaseEntity *)*piVar12,SUB41(piVar12[1],0),SUB41(piVar12[2],0),
(CTakeDamageInfo *)piVar12[3]);
if (cVar5 == '\0') {
iVar10 = *(int *)this_00;
*piVar12 = (int)this_00;
pcVar3 = *(code **)(iVar10 + 0x16c);
piVar12[-1] = 0x563516;
cVar5 = (*pcVar3)();
if (cVar5 == '\0') {
iVar10 = *(int *)this_00;
*piVar12 = (int)this_00;
pcVar3 = *(code **)(iVar10 + 0x144);
piVar12[-1] = 0x563529;
iVar10 = (*pcVar3)();
if (iVar10 == 0) {
if (*(char **)(this_00 + 0x7c) != "func_door*") {
piVar12[1] = (int)"func_door*";
*piVar12 = (int)this_00;
piVar12[-1] = 0x563c4d;
cVar5 = CBaseEntity::ClassMatchesComplex((CBaseEntity *)*piVar12,(char *)piVar12[1]);
if ((cVar5 == '\0') && (*(char **)(this_00 + 0x7c) != "prop_door*")) {
piVar12[1] = (int)"prop_door*";
*piVar12 = (int)this_00;
piVar12[-1] = 0x563c72;
cVar5 = CBaseEntity::ClassMatchesComplex((CBaseEntity *)*piVar12,(char *)piVar12[1])
;
if (cVar5 == '\0') {
if (*(char **)(this_00 + 0x7c) != "finale_trigger") {
piVar12[1] = (int)"finale_trigger";
*piVar12 = (int)this_00;
piVar12[-1] = 0x563c93;
cVar5 = CBaseEntity::ClassMatchesComplex
((CBaseEntity *)*piVar12,(char *)piVar12[1]);
if ((cVar5 == '\0') && (*(char **)(this_00 + 0x7c) != "trigger_finale")) {
piVar12[1] = (int)"trigger_finale";
*piVar12 = (int)this_00;
piVar12[-1] = 0x563cb0;
cVar5 = CBaseEntity::ClassMatchesComplex
((CBaseEntity *)*piVar12,(char *)piVar12[1]);
if (cVar5 == '\0') {
return 0;
}
}
}
piVar4 = *(int **)(this + 4);
iVar10 = *piVar4;
*piVar12 = (int)local_f4;
piVar12[1] = (int)piVar4;
pcVar3 = *(code **)(iVar10 + 0x234);
piVar12[-1] = 0x563cd6;
local_128 = this_00;
(*pcVar3)();
*piVar12 = (int)&local_e8;
piVar12[-1] = (int)(this + 0x10);
piVar12[-2] = 0x563cee;
AngleVectors((QAngle *)piVar12[-1],(Vector *)*piVar12);
iVar10 = **(int **)(this + 4);
*piVar12 = (int)*(int **)(this + 4);
piVar12[-1] = (int)&local_cc;
pcVar3 = *(code **)(iVar10 + 0x234);
piVar12[-2] = 0x563d06;
(*pcVar3)();
iVar10 = *(int *)local_128;
piVar12[-2] = (int)local_128;
pcVar3 = *(code **)(iVar10 + 0x288);
piVar12[-3] = 0x563d1a;
pfVar7 = (float *)(*pcVar3)();
local_d4 = pfVar7[2];
local_dc = *pfVar7;
local_d8 = pfVar7[1] - local_c8;
piVar12[-2] = (int)&local_dc;
local_d4 = local_d4 - local_c4;
local_dc = local_dc - local_cc;
piVar12[-3] = 0x563d66;
VectorNormalize((Vector *)piVar12[-2]);
fVar14 = local_e4 * local_d8 + local_e8 * local_dc + local_e0 * local_d4;
if (*(float *)(this + 0xc) <= fVar14 && fVar14 != *(float *)(this + 0xc)) {
*(float *)(this + 0xc) = fVar14;
*(CBaseEntity **)(this + 8) = local_128;
}
iVar10 = *(int *)(this + 0x28);
if (0 < iVar10) {
if ((CBaseEntity *)**(undefined4 **)(this + 0x1c) == local_128) {
return 0;
}
iVar8 = 0;
do {
iVar8 = iVar8 + 1;
if (iVar8 == iVar10) goto LAB_00563ddc;
} while ((CBaseEntity *)(*(undefined4 **)(this + 0x1c))[iVar8] != local_128);
if (iVar8 != -1) {
return 0;
}
}
LAB_00563ddc:
ppCVar9 = &local_128;
goto LAB_005637d6;
}
}
}
piVar12[1] = (int)this_00;
*piVar12 = (int)this;
piVar12[-1] = 0x563dfc;
TrackHit((HulkSmashableEnumerator *)*piVar12,(CBaseEntity *)piVar12[1]);
return 0;
}
piVar4 = *(int **)(this + 4);
iVar10 = *piVar4;
*piVar12 = (int)local_f4;
piVar12[1] = (int)piVar4;
pcVar3 = *(code **)(iVar10 + 0x234);
piVar12[-1] = 0x56354f;
local_12c = this_00;
(*pcVar3)();
*piVar12 = (int)&local_e8;
piVar12[-1] = (int)(this + 0x10);
piVar12[-2] = 0x563567;
AngleVectors((QAngle *)piVar12[-1],(Vector *)*piVar12);
iVar10 = **(int **)(this + 4);
*piVar12 = (int)*(int **)(this + 4);
piVar12[-1] = (int)&local_cc;
pcVar3 = *(code **)(iVar10 + 0x234);
piVar12[-2] = 0x56357f;
(*pcVar3)();
iVar10 = *(int *)local_12c;
piVar12[-2] = (int)local_12c;
pcVar3 = *(code **)(iVar10 + 0x288);
piVar12[-3] = 0x563593;
pfVar7 = (float *)(*pcVar3)();
local_d4 = pfVar7[2];
local_dc = *pfVar7;
local_d8 = pfVar7[1] - local_c8;
piVar12[-2] = (int)&local_dc;
local_d4 = local_d4 - local_c4;
local_dc = local_dc - local_cc;
piVar12[-3] = 0x5635df;
VectorNormalize((Vector *)piVar12[-2]);
fVar14 = local_e4 * local_d8 + local_e8 * local_dc + local_e0 * local_d4;
if (*(float *)(this + 0xc) <= fVar14 && fVar14 != *(float *)(this + 0xc)) {
*(float *)(this + 0xc) = fVar14;
*(CBaseEntity **)(this + 8) = local_12c;
}
iVar10 = *(int *)(this + 0x28);
if (0 < iVar10) {
if ((CBaseEntity *)**(undefined4 **)(this + 0x1c) == local_12c) {
return 0;
}
iVar8 = 0;
do {
iVar8 = iVar8 + 1;
if (iVar8 == iVar10) goto LAB_00563660;
} while ((CBaseEntity *)(*(undefined4 **)(this + 0x1c))[iVar8] != local_12c);
if (iVar8 != -1) {
return 0;
}
}
LAB_00563660:
ppCVar9 = &local_12c;
}
else {
piVar4 = *(int **)(this + 4);
iVar10 = *piVar4;
*piVar12 = (int)local_f4;
piVar12[1] = (int)piVar4;
pcVar3 = *(code **)(iVar10 + 0x234);
piVar12[-1] = 0x563afe;
local_130 = this_00;
(*pcVar3)();
*piVar12 = (int)&local_e8;
piVar12[-1] = (int)(this + 0x10);
piVar12[-2] = 0x563b16;
AngleVectors((QAngle *)piVar12[-1],(Vector *)*piVar12);
iVar10 = **(int **)(this + 4);
*piVar12 = (int)*(int **)(this + 4);
piVar12[-1] = (int)&local_cc;
pcVar3 = *(code **)(iVar10 + 0x234);
piVar12[-2] = 0x563b2e;
(*pcVar3)();
iVar10 = *(int *)local_130;
piVar12[-2] = (int)local_130;
pcVar3 = *(code **)(iVar10 + 0x288);
piVar12[-3] = 0x563b42;
pfVar7 = (float *)(*pcVar3)();
local_d4 = pfVar7[2];
local_dc = *pfVar7;
local_d8 = pfVar7[1] - local_c8;
piVar12[-2] = (int)&local_dc;
local_d4 = local_d4 - local_c4;
local_dc = local_dc - local_cc;
piVar12[-3] = 0x563b8e;
VectorNormalize((Vector *)piVar12[-2]);
fVar14 = local_e4 * local_d8 + local_e8 * local_dc + local_e0 * local_d4;
if (*(float *)(this + 0xc) <= fVar14 && fVar14 != *(float *)(this + 0xc)) {
*(float *)(this + 0xc) = fVar14;
*(CBaseEntity **)(this + 8) = local_130;
}
iVar10 = *(int *)(this + 0x28);
if (0 < iVar10) {
if ((CBaseEntity *)**(undefined4 **)(this + 0x1c) == local_130) {
return 0;
}
iVar8 = 0;
do {
iVar8 = iVar8 + 1;
if (iVar8 == iVar10) goto LAB_00563c10;
} while ((CBaseEntity *)(*(undefined4 **)(this + 0x1c))[iVar8] != local_130);
if (iVar8 != -1) {
return 0;
}
}
LAB_00563c10:
ppCVar9 = &local_130;
}
}
else {
piVar4 = *(int **)(this + 4);
iVar10 = *piVar4;
*piVar12 = (int)local_f4;
piVar12[1] = (int)piVar4;
pcVar3 = *(code **)(iVar10 + 0x234);
piVar12[-1] = 0x563966;
local_134 = this_00;
(*pcVar3)();
*piVar12 = (int)&local_e8;
piVar12[-1] = (int)(this + 0x10);
piVar12[-2] = 0x56397e;
AngleVectors((QAngle *)piVar12[-1],(Vector *)*piVar12);
iVar10 = **(int **)(this + 4);
*piVar12 = (int)*(int **)(this + 4);
piVar12[-1] = (int)&local_cc;
pcVar3 = *(code **)(iVar10 + 0x234);
piVar12[-2] = 0x563996;
(*pcVar3)();
iVar10 = *(int *)local_134;
piVar12[-2] = (int)local_134;
pcVar3 = *(code **)(iVar10 + 0x288);
piVar12[-3] = 0x5639aa;
pfVar7 = (float *)(*pcVar3)();
local_d4 = pfVar7[2];
local_dc = *pfVar7;
local_d8 = pfVar7[1] - local_c8;
piVar12[-2] = (int)&local_dc;
local_d4 = local_d4 - local_c4;
local_dc = local_dc - local_cc;
piVar12[-3] = 0x5639f6;
VectorNormalize((Vector *)piVar12[-2]);
fVar14 = local_e4 * local_d8 + local_e8 * local_dc + local_e0 * local_d4;
if (*(float *)(this + 0xc) <= fVar14 && fVar14 != *(float *)(this + 0xc)) {
*(float *)(this + 0xc) = fVar14;
*(CBaseEntity **)(this + 8) = local_134;
}
iVar10 = *(int *)(this + 0x28);
if (0 < iVar10) {
if ((CBaseEntity *)**(undefined4 **)(this + 0x1c) == local_134) {
return 0;
}
iVar8 = 0;
do {
iVar8 = iVar8 + 1;
if (iVar8 == iVar10) goto LAB_00563a70;
} while ((CBaseEntity *)(*(undefined4 **)(this + 0x1c))[iVar8] != local_134);
if (iVar8 != -1) {
return 0;
}
}
LAB_00563a70:
ppCVar9 = &local_134;
}
}
else {
piVar4 = *(int **)(this + 4);
iVar10 = *piVar4;
*piVar12 = (int)local_f4;
piVar12[1] = (int)piVar4;
pcVar3 = *(code **)(iVar10 + 0x234);
piVar12[-1] = 0x56380e;
local_138 = this_00;
(*pcVar3)();
*piVar12 = (int)&local_e8;
piVar12[-1] = (int)(this + 0x10);
piVar12[-2] = 0x563826;
AngleVectors((QAngle *)piVar12[-1],(Vector *)*piVar12);
iVar10 = **(int **)(this + 4);
*piVar12 = (int)*(int **)(this + 4);
piVar12[-1] = (int)&local_cc;
pcVar3 = *(code **)(iVar10 + 0x234);
piVar12[-2] = 0x56383e;
(*pcVar3)();
iVar10 = *(int *)local_138;
piVar12[-2] = (int)local_138;
pcVar3 = *(code **)(iVar10 + 0x288);
piVar12[-3] = 0x563852;
pfVar7 = (float *)(*pcVar3)();
local_d4 = pfVar7[2];
local_dc = *pfVar7;
local_d8 = pfVar7[1] - local_c8;
piVar12[-2] = (int)&local_dc;
local_d4 = local_d4 - local_c4;
local_dc = local_dc - local_cc;
piVar12[-3] = 0x56389e;
VectorNormalize((Vector *)piVar12[-2]);
fVar14 = local_e4 * local_d8 + local_e8 * local_dc + local_e0 * local_d4;
if (*(float *)(this + 0xc) <= fVar14 && fVar14 != *(float *)(this + 0xc)) {
*(float *)(this + 0xc) = fVar14;
*(CBaseEntity **)(this + 8) = local_138;
}
iVar10 = *(int *)(this + 0x28);
if (0 < iVar10) {
if ((CBaseEntity *)**(undefined4 **)(this + 0x1c) == local_138) {
return 0;
}
iVar8 = 0;
do {
iVar8 = iVar8 + 1;
if (iVar8 == iVar10) goto LAB_00563920;
} while ((CBaseEntity *)(*(undefined4 **)(this + 0x1c))[iVar8] != local_138);
if (iVar8 != -1) {
return 0;
}
}
LAB_00563920:
ppCVar9 = &local_138;
}
}
else {
piVar4 = *(int **)(this + 4);
iVar10 = *piVar4;
*piVar12 = (int)local_f4;
piVar12[1] = (int)piVar4;
pcVar3 = *(code **)(iVar10 + 0x234);
piVar12[-1] = 0x5636ce;
local_13c = this_00;
(*pcVar3)();
*piVar12 = (int)&local_e8;
piVar12[-1] = (int)(this + 0x10);
piVar12[-2] = 0x5636e6;
AngleVectors((QAngle *)piVar12[-1],(Vector *)*piVar12);
iVar10 = **(int **)(this + 4);
*piVar12 = (int)*(int **)(this + 4);
piVar12[-1] = (int)&local_cc;
pcVar3 = *(code **)(iVar10 + 0x234);
piVar12[-2] = 0x5636fe;
(*pcVar3)();
iVar10 = *(int *)local_13c;
piVar12[-2] = (int)local_13c;
pcVar3 = *(code **)(iVar10 + 0x288);
piVar12[-3] = 0x563712;
pfVar7 = (float *)(*pcVar3)();
local_d4 = pfVar7[2];
local_dc = *pfVar7;
local_d8 = pfVar7[1] - local_c8;
piVar12[-2] = (int)&local_dc;
local_d4 = local_d4 - local_c4;
local_dc = local_dc - local_cc;
piVar12[-3] = 0x56375e;
VectorNormalize((Vector *)piVar12[-2]);
fVar14 = local_e4 * local_d8 + local_e8 * local_dc + local_e0 * local_d4;
if (*(float *)(this + 0xc) <= fVar14 && fVar14 != *(float *)(this + 0xc)) {
*(float *)(this + 0xc) = fVar14;
*(CBaseEntity **)(this + 8) = local_13c;
}
iVar10 = *(int *)(this + 0x28);
if (0 < iVar10) {
if ((CBaseEntity *)**(undefined4 **)(this + 0x1c) == local_13c) {
return 0;
}
iVar8 = 0;
do {
iVar8 = iVar8 + 1;
if (iVar8 == iVar10) goto LAB_005637d0;
} while (local_13c != (CBaseEntity *)(*(undefined4 **)(this + 0x1c))[iVar8]);
if (iVar8 != -1) {
return 0;
}
}
LAB_005637d0:
ppCVar9 = &local_13c;
}
LAB_005637d6:
*piVar12 = (int)ppCVar9;
piVar12[-1] = iVar10;
piVar12[-2] = (int)(this + 0x1c);
piVar12[-3] = 0x5637e9;
CUtlVector<CBaseEntity*,CUtlMemory<CBaseEntity*,int>>::InsertBefore
((CUtlVector<CBaseEntity*,CUtlMemory<CBaseEntity*,int>> *)piVar12[-2],piVar12[-1],
(CBaseEntity **)*piVar12);
return 0;
}
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.