CPointPush::PushThink
0x0079cb60 · 2778 bytes · __thiscall
_ZN10CPointPush9PushThinkEv
Decompiled
undefined (1 param)
/* CPointPush::PushThink() */
void __thiscall CPointPush::PushThink(CPointPush *this)
{
uint uVar1;
int iVar2;
code *pcVar3;
code *pcVar4;
char cVar5;
Vector *pVVar6;
int iVar7;
CBaseEntity *pCVar8;
undefined *puVar9;
int iVar10;
int *piVar11;
int *piVar12;
int *piVar13;
int *piVar14;
longdouble lVar15;
float fVar16;
float fVar17;
float fVar18;
double dVar19;
float local_51c;
float *local_518;
float local_500;
float local_4fc;
float local_4f8;
float local_4f4;
float local_4f0;
float local_4ec;
float local_4e8;
float local_4e4;
float local_4e0;
float local_4dc;
float local_4d8;
float local_4d4;
float local_4cc;
float local_4c8;
float local_4c4;
float local_4bc;
float local_4b8;
float local_4b4;
undefined4 local_4ac;
undefined4 local_4a8;
undefined4 local_4a4;
undefined4 local_49c;
undefined4 local_498;
undefined4 local_494;
undefined4 local_48c;
undefined1 local_488;
bool local_487;
float local_470;
float local_46c;
float local_468;
undefined1 local_464 [32];
float local_444;
CBaseEntity *local_424;
CBaseEntity *local_41c [259];
piVar11 = (int *)&stack0xfffffab4;
fVar17 = *(float *)(this + 0x448);
if (((byte)this[0x14d] & 8) != 0) {
CBaseEntity::CalcAbsolutePosition((CBaseEntity *)this);
}
pVVar6 = (Vector *)(this + 0x2e0);
CFlaggedEntitiesEnum::CFlaggedEntitiesEnum((CFlaggedEntitiesEnum *)&local_470,local_41c,0x100,0);
iVar7 = UTIL_EntitiesInSphere(pVVar6,fVar17,(CFlaggedEntitiesEnum *)&local_470);
if (iVar7 < 1) {
LAB_0079cc70:
piVar11[2] = 0;
piVar11[1] = (int)(*(float *)(gpGlobals + 0xc) + 0.05);
*piVar11 = (int)this;
piVar11[-1] = 0x79cc9b;
CBaseEntity::SetNextThink((CBaseEntity *)*piVar11,(float)piVar11[1],(char *)piVar11[2]);
return;
}
iVar10 = 0;
piVar11 = (int *)&stack0xfffffab4;
LAB_0079cc13:
do {
pCVar8 = local_41c[iVar10];
if ((pCVar8[0x1b6] == (CBaseEntity)0x0) || ((*(ushort *)(pCVar8 + 0x1b4) & 4) != 0))
goto switchD_0079d051_caseD_0;
uVar1 = *(uint *)(pCVar8 + 0x188);
if ((uVar1 != 0xffffffff) &&
(((puVar9 = g_pEntityList + (uVar1 & 0xfff) * 0x10, puVar9 != (undefined *)0xfffffffc &&
(*(uint *)(puVar9 + 8) == uVar1 >> 0xc)) && (*(int *)(puVar9 + 4) != 0))))
goto code_r0x0079cc5f;
if ((pCVar8[0x186] != (CBaseEntity)0x6) && (1 < (byte)((char)pCVar8[0x186] - 2U)))
goto switchD_0079d051_caseD_0;
iVar2 = *(int *)pCVar8;
*piVar11 = (int)pCVar8;
pcVar3 = *(code **)(iVar2 + 0x16c);
piVar11[-1] = 0x79ccb3;
cVar5 = (*pcVar3)();
if (((cVar5 != '\0') && (((byte)this[0x148] & 8) == 0)) ||
((pCVar8 = local_41c[iVar10], pCVar8[0x186] == (CBaseEntity)0x6 &&
(((byte)this[0x148] & 0x10) == 0)))) goto switchD_0079d051_caseD_0;
piVar12 = piVar11;
if (*(float *)(this + 0x450) != 0.0) {
pcVar3 = *(code **)(*(int *)pCVar8 + 0x244);
if (((byte)this[0x14d] & 8) != 0) {
*piVar11 = (int)this;
piVar11[-1] = 0x79d474;
CBaseEntity::CalcAbsolutePosition((CBaseEntity *)*piVar11);
pCVar8 = local_41c[iVar10];
}
piVar11[1] = (int)pCVar8;
piVar11[3] = 0;
*piVar11 = (int)&local_4dc;
piVar11[2] = (int)pVVar6;
piVar11[-1] = 0x79d091;
(*pcVar3)();
piVar14 = piVar11 + -1;
if (((byte)this[0x14d] & 8) != 0) {
piVar11[-1] = (int)this;
piVar11[-2] = 0x79d467;
CBaseEntity::CalcAbsolutePosition((CBaseEntity *)piVar11[-1]);
}
local_4cc = local_4dc - *(float *)(this + 0x2e0);
local_4c8 = local_4d8 - *(float *)(this + 0x2e4);
fVar17 = *(float *)(this + 0x2e8);
piVar11[-1] = (int)&local_4cc;
local_4c4 = local_4d4 - fVar17;
piVar11[-2] = 0x79d103;
VectorNormalize((Vector *)piVar11[-1]);
if (((byte)this[0x14d] & 8) != 0) {
piVar11[-1] = (int)this;
piVar11[-2] = 0x79d45a;
CBaseEntity::CalcAbsolutePosition((CBaseEntity *)piVar11[-1]);
}
*piVar11 = (int)&local_470;
piVar11[-1] = (int)(this + 0x37c);
piVar11[-2] = 0x79d12f;
AngleVectors((QAngle *)piVar11[-1],(Vector *)*piVar11);
*(double *)(piVar11 + -1) = (double)(*(float *)(this + 0x450) * 0.017453292);
piVar11[-2] = 0x79d152;
dVar19 = cos(*(double *)(piVar11 + -1));
piVar11 = piVar11 + -1;
piVar12 = piVar14;
if ((double)(local_46c * local_4c8 + local_470 * local_4cc + local_468 * local_4c4) < dVar19)
goto switchD_0079d051_caseD_0;
}
local_518 = &local_4cc;
piVar13 = piVar12;
if (((byte)this[0x148] & 1) != 0) {
if (((byte)this[0x14d] & 8) != 0) {
*piVar12 = (int)this;
piVar12[-1] = 0x79d484;
CBaseEntity::CalcAbsolutePosition((CBaseEntity *)*piVar12);
}
local_500 = *(float *)(this + 0x2e0);
local_4fc = *(float *)(this + 0x2e4);
local_4f8 = *(float *)(this + 0x2e8);
pCVar8 = local_41c[iVar10];
iVar2 = *(int *)pCVar8;
piVar12[1] = (int)pCVar8;
piVar12[3] = 0;
piVar12[2] = (int)&local_500;
*piVar12 = (int)&local_4f4;
pcVar3 = *(code **)(iVar2 + 0x244);
piVar12[-1] = 0x79cd73;
(*pcVar3)();
if (*(float *)(this + 0x44c) != 0.0) {
piVar12[-1] = (int)&local_470;
local_470 = local_4f4 - local_500;
local_46c = local_4f0 - local_4fc;
local_468 = local_4ec - local_4f8;
piVar12[-2] = 0x79d4df;
VectorNormalize((Vector *)piVar12[-1]);
fVar17 = *(float *)(this + 0x44c);
fVar16 = local_470 * fVar17;
fVar18 = local_46c * fVar17;
fVar17 = fVar17 * local_468;
if (((byte)this[0x14d] & 8) != 0) {
piVar12[-1] = (int)this;
piVar12[-2] = 0x79d621;
CBaseEntity::CalcAbsolutePosition((CBaseEntity *)piVar12[-1]);
}
local_4fc = fVar18 + *(float *)(this + 0x2e4);
local_4f8 = fVar17 + *(float *)(this + 0x2e8);
local_500 = fVar16 + *(float *)(this + 0x2e0);
}
pCVar8 = local_41c[iVar10];
iVar2 = *(int *)pCVar8;
piVar12[-1] = (int)&local_4e8;
piVar12[1] = (int)&local_500;
*piVar12 = (int)pCVar8;
piVar12[2] = 0;
pcVar3 = *(code **)(iVar2 + 0x244);
piVar12[-2] = 0x79cdb3;
(*pcVar3)();
local_494 = 0;
piVar12[1] = 0;
*piVar12 = 0;
local_4bc = local_4e8 - local_500;
piVar12[-2] = (int)&local_4dc;
local_4b4 = local_4e0 - local_4f8;
local_4cc = local_500;
local_4c8 = local_4fc;
local_4b8 = local_4e4 - local_4fc;
piVar12[-1] = (int)this;
local_4c4 = local_4f8;
local_498 = 0;
local_49c = 0;
local_48c = 0;
local_488 = 1;
local_4a4 = 0;
local_4a8 = 0;
local_4ac = 0;
local_487 = local_4b4 * local_4b4 + local_4bc * local_4bc + local_4b8 * local_4b8 != 0.0;
piVar12[-3] = 0x79ceaf;
CTraceFilterSimple::CTraceFilterSimple
((CTraceFilterSimple *)piVar12[-2],(IHandleEntity *)piVar12[-1],*piVar12,
(_func_bool_IHandleEntity_ptr_int *)piVar12[1]);
iVar2 = *enginetrace;
piVar12[2] = (int)&local_470;
piVar12[-2] = (int)enginetrace;
piVar12[1] = (int)&local_4dc;
*piVar12 = 0x400b;
piVar12[-1] = (int)local_518;
pcVar3 = *(code **)(iVar2 + 0x14);
piVar12[-3] = 0x79cedc;
(*pcVar3)();
if (*(int *)(r_visualizetraces._28_4_ + 0x30) != 0) {
piVar12[4] = -0x40800000;
piVar12[-1] = (int)local_464;
piVar12[3] = 1;
piVar12[2] = 0;
piVar12[1] = 0;
*piVar12 = 0xff;
piVar12[-2] = (int)&local_470;
piVar12[-3] = 0x79cf28;
DebugDrawLine((Vector *)piVar12[-2],(Vector *)piVar12[-1],*piVar12,piVar12[1],piVar12[2],
SUB41(piVar12[3],0),(float)piVar12[4]);
}
piVar13 = piVar12 + -2;
if ((local_444 < 1.0) &&
(piVar11 = piVar12 + -2, piVar13 = piVar12 + -2, local_424 != local_41c[iVar10]))
goto switchD_0079d051_caseD_0;
}
if (((byte)this[0x14d] & 8) != 0) {
*piVar13 = (int)this;
piVar13[-1] = 0x79d5d4;
CBaseEntity::CalcAbsolutePosition((CBaseEntity *)*piVar13);
}
pCVar8 = local_41c[iVar10];
if (((byte)this[0x148] & 2) == 0) {
iVar2 = *(int *)pCVar8;
piVar13[3] = 0;
piVar13[1] = (int)pCVar8;
piVar13[2] = (int)pVVar6;
*piVar13 = (int)&local_470;
pcVar3 = *(code **)(iVar2 + 0x244);
piVar13[-1] = 0x79cf87;
(*pcVar3)();
local_4c8 = local_46c - *(float *)(this + 0x2e4);
local_4c4 = local_468 - *(float *)(this + 0x2e8);
local_4cc = local_470 - *(float *)(this + 0x2e0);
piVar11 = piVar13 + -1;
}
else {
iVar2 = *(int *)this;
piVar13[3] = 0;
piVar13[2] = 0;
piVar13[1] = (int)local_518;
*piVar13 = (int)this;
pcVar3 = *(code **)(iVar2 + 0x24c);
piVar13[-1] = 0x79d1f7;
(*pcVar3)();
piVar11 = piVar13;
}
*piVar11 = (int)local_518;
piVar11[-1] = 0x79cfe3;
lVar15 = (longdouble)VectorNormalize((Vector *)*piVar11);
fVar17 = 1.0;
if (((byte)this[0x148] & 4) == 0) {
fVar17 = *(float *)(this + 0x448);
if (fVar17 == fVar17 * 0.25) {
fVar17 = (float)(-(uint)(fVar17 <= (float)lVar15) & 0x3f800000);
}
else {
fVar17 = ((float)lVar15 - fVar17) / (fVar17 * 0.25 - fVar17);
if (1.0 <= fVar17) {
fVar17 = 1.0;
}
if (fVar17 <= 0.0) {
fVar17 = 0.0;
}
}
}
switch(pCVar8[0x186]) {
case (CBaseEntity)0x0:
case (CBaseEntity)0x7:
case (CBaseEntity)0x8:
break;
default:
goto LAB_0079d2e5;
case (CBaseEntity)0x3:
local_4c4 = 0.0;
LAB_0079d2e5:
fVar16 = *(float *)(this + 0x444);
fVar18 = local_4cc * fVar16 * fVar17;
local_51c = local_4c8 * fVar16 * fVar17;
local_518 = (float *)(local_4c4 * fVar17 * fVar16);
if ((*(uint *)(pCVar8 + 0x150) & 0x800000) != 0) {
fVar18 = *(float *)(pCVar8 + 0x268) + fVar18;
local_518 = (float *)(*(float *)(pCVar8 + 0x270) + (float)local_518);
local_51c = *(float *)(pCVar8 + 0x26c) + local_51c;
}
if ((0.0 < (float)local_518) && ((*(uint *)(pCVar8 + 0x150) & 1) != 0)) {
piVar11[1] = 0;
*piVar11 = (int)pCVar8;
piVar11[-1] = 0x79d39d;
CBaseEntity::SetGroundEntity((CBaseEntity *)*piVar11,(CBaseEntity *)piVar11[1]);
if (((byte)pCVar8[0x14d] & 8) != 0) {
*piVar11 = (int)pCVar8;
piVar11[-1] = 0x79d646;
CBaseEntity::CalcAbsolutePosition((CBaseEntity *)*piVar11);
}
local_470 = *(float *)(pCVar8 + 0x2e0);
local_46c = *(float *)(pCVar8 + 0x2e4);
fVar17 = *(float *)(pCVar8 + 0x2e8);
*piVar11 = (int)pCVar8;
piVar11[1] = (int)&local_470;
local_468 = fVar17 + 1.0;
piVar11[-1] = 0x79d3f8;
CBaseEntity::SetAbsOrigin((CBaseEntity *)*piVar11,(Vector *)piVar11[1]);
}
if (((fVar18 == *(float *)(pCVar8 + 0x268)) && (local_51c == *(float *)(pCVar8 + 0x26c))) &&
((float)local_518 == *(float *)(pCVar8 + 0x270))) {
piVar11[1] = 0x800000;
*piVar11 = (int)pCVar8;
piVar11[-1] = 0x79d44d;
CBaseEntity::AddFlag((CBaseEntity *)*piVar11,piVar11[1]);
}
else {
iVar2 = *(int *)pCVar8;
piVar11[1] = (int)(pCVar8 + 0x268);
*piVar11 = (int)pCVar8;
pcVar3 = *(code **)(iVar2 + 0x2fc);
piVar11[-1] = 0x79d587;
(*pcVar3)();
*(float *)(pCVar8 + 0x268) = fVar18;
*(float *)(pCVar8 + 0x26c) = local_51c;
*(float **)(pCVar8 + 0x270) = local_518;
piVar11[1] = 0x800000;
*piVar11 = (int)pCVar8;
piVar11[-1] = 0x79d5c7;
CBaseEntity::AddFlag((CBaseEntity *)*piVar11,piVar11[1]);
}
break;
case (CBaseEntity)0x6:
piVar12 = *(int **)(pCVar8 + 0x238);
if (piVar12 != (int *)0x0) {
iVar2 = *piVar12;
pcVar3 = *(code **)(iVar2 + 0xf4);
fVar16 = *(float *)(gpGlobals + 0x10);
*piVar11 = (int)piVar12;
pcVar4 = *(code **)(iVar2 + 0x78);
piVar11[-1] = 0x79d239;
lVar15 = (longdouble)(*pcVar4)();
local_468 = (float)lVar15;
fVar18 = *(float *)(this + 0x444);
*piVar11 = (int)piVar12;
piVar11[1] = (int)&local_470;
fVar17 = fVar17 * fVar18 * 100.0;
local_470 = local_4cc * fVar16 * fVar17 * local_468;
local_46c = local_4c8 * fVar16 * fVar17 * local_468;
local_468 = local_4c4 * fVar16 * fVar17 * local_468;
piVar11[-1] = 0x79d2d3;
(*pcVar3)();
}
}
switchD_0079d051_caseD_0:
iVar10 = iVar10 + 1;
} while (iVar10 != iVar7);
goto LAB_0079cc70;
code_r0x0079cc5f:
iVar10 = iVar10 + 1;
if (iVar10 == iVar7) goto LAB_0079cc70;
goto LAB_0079cc13;
}
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.