CTerrorGameMovement::UnblockPusher
0x00500af0 · 1479 bytes · __thiscall
_ZN19CTerrorGameMovement13UnblockPusherEP11CBasePlayerP11CBaseEntity
Decompiled
undefined (3 params)
/* CTerrorGameMovement::UnblockPusher(CBasePlayer*, CBaseEntity*) */
void __thiscall
CTerrorGameMovement::UnblockPusher
(CTerrorGameMovement *this,CBasePlayer *param_1,CBaseEntity *param_2)
{
undefined4 uVar1;
char cVar2;
uint uVar3;
float *pfVar4;
float *pfVar5;
int iVar6;
Vector *pVVar7;
float fVar8;
float fVar9;
float local_168;
float local_164;
float local_160;
float local_150;
ITraceFilter *local_14c;
float local_148;
float local_144;
float local_140;
float local_13c;
float local_138;
float local_134;
float local_130;
float local_12c;
float local_128;
float local_124;
float local_120;
float local_11c;
float local_118;
float local_114;
float local_110;
float local_10c;
float local_108;
float local_104;
undefined4 local_100;
undefined4 local_fc;
uint local_f8;
uint local_f4;
undefined4 local_f0;
undefined4 local_ec;
uint local_e8;
undefined4 local_e4;
undefined4 local_e0;
undefined4 local_dc;
uint local_d8;
undefined4 local_d4;
undefined4 local_d0;
uint local_cc;
undefined4 local_c8;
CGameTrace local_c4 [12];
float local_b8;
float local_b4;
float local_b0;
CGameTrace local_70 [12];
float local_64;
float local_60;
float local_5c;
if (param_1 == (CBasePlayer *)0x0) {
return;
}
cVar2 = (**(code **)(*(int *)param_1 + 0x16c))(param_1);
if (cVar2 == '\0') {
return;
}
if (param_2 == (CBaseEntity *)0x0) {
return;
}
*(CBasePlayer **)(this + 4) = param_1;
uVar1 = *(undefined4 *)(this + 0x810);
*(CBasePlayer **)(this + 0x810) = param_1;
s_pIgnoreEntity = param_2;
local_14c = (ITraceFilter *)(**(code **)(*(int *)this + 0x108))(this,8);
*(undefined4 *)(this + 0x810) = uVar1;
*(undefined4 *)(this + 4) = uVar1;
uVar3 = *(uint *)(param_1 + 0x14c);
s_pIgnoreEntity = (CBaseEntity *)0x0;
if ((uVar3 & 0x1000) != 0) {
CBaseEntity::CalcAbsoluteVelocity((CBaseEntity *)param_1);
uVar3 = *(uint *)(param_1 + 0x14c);
}
local_148 = *(float *)(param_1 + 0x274);
local_144 = *(float *)(param_1 + 0x278);
local_140 = *(float *)(param_1 + 0x27c);
if ((uVar3 & 0x800) != 0) {
CBaseEntity::CalcAbsolutePosition((CBaseEntity *)param_1);
}
local_13c = *(float *)(param_1 + 0x2e0);
local_138 = *(float *)(param_1 + 0x2e4);
local_134 = *(float *)(param_1 + 0x2e8);
pfVar4 = (float *)(**(code **)(*(int *)param_2 + 0x288))(param_2);
pfVar5 = (float *)(**(code **)(*(int *)param_1 + 0x288))(param_1);
local_130 = *pfVar5 - *pfVar4;
local_12c = pfVar5[1] - pfVar4[1];
local_128 = 0.0;
if ((((-0.01 < local_130) && (local_130 < 0.01)) && (-0.01 < local_12c)) && (local_12c < 0.01))
goto LAB_0050102a;
VectorNormalize((Vector *)&local_130);
local_120 = local_12c * 18.0 + local_138;
local_11c = local_128 * 18.0 + local_134;
local_124 = local_130 * 18.0 + local_13c;
iVar6 = (**(code **)(*(int *)this + 0x40))(this,0,param_1);
UpdatePosition(this,(CTerrorPlayer *)param_1,(Vector *)&local_13c,(Vector *)&local_124,0.7,
(Vector *)&local_148,local_c4,local_14c,iVar6,(Vector *)0x0);
if ((((local_b8 - local_124 <= -0.01) || (0.01 <= local_b8 - local_124)) ||
((local_b4 - local_120 <= -0.01 ||
((0.01 <= local_b4 - local_120 || (local_b0 - local_11c <= -0.01)))))) ||
(0.01 <= local_b0 - local_11c)) {
local_100 = 0;
pVVar7 = (Vector *)&local_100;
local_fc = 0;
local_f0 = 0;
local_f8 = *(uint *)(param_1 + 0x1acc);
local_150 = local_140;
local_118 = local_b8;
local_160 = vec3_origin;
local_e8 = local_f8 ^ 0x80000000;
local_114 = local_b4;
local_ec = 0;
local_e4 = 0;
local_e0 = 0;
local_dc = 0;
local_d4 = 0;
local_d0 = 0;
local_c8 = 0;
local_110 = local_b0;
local_164 = DAT_01053d4c;
local_168 = DAT_01053d50;
fVar8 = local_144;
fVar9 = local_148;
local_f4 = local_f8;
local_d8 = local_f8;
local_cc = local_e8;
do {
local_10c = local_148;
local_108 = local_144;
local_104 = local_140;
UpdatePosition(this,(CTerrorPlayer *)param_1,(Vector *)&local_13c,(Vector *)&local_124,0.7,
(Vector *)&local_10c,local_70,local_14c,iVar6,pVVar7);
if (fVar8 * fVar8 + fVar9 * fVar9 + local_150 * local_150 <
local_10c * local_10c + local_108 * local_108 + local_104 * local_104) {
local_150 = local_104;
local_160 = *(float *)pVVar7;
local_118 = local_64;
local_164 = *(float *)(pVVar7 + 4);
local_114 = local_60;
local_168 = *(float *)(pVVar7 + 8);
local_110 = local_5c;
fVar8 = local_108;
fVar9 = local_10c;
}
pVVar7 = pVVar7 + 0xc;
} while (pVVar7 != (Vector *)local_c4);
if (((((-0.01 < local_160) && (local_160 < 0.01)) && (-0.01 < local_164)) &&
((local_164 < 0.01 && (-0.01 < local_168)))) && (local_168 < 0.01)) goto LAB_00501095;
pVVar7 = (Vector *)&local_118;
}
else {
LAB_00501095:
pVVar7 = (Vector *)&local_b8;
}
CBaseEntity::SetAbsOrigin((CBaseEntity *)param_1,pVVar7);
LAB_0050102a:
(**(code **)(*(int *)this + 0x10c))(this,&local_14c);
return;
}
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.