InfectedShoved::OnShoved
0x00a1c6d0 · 1192 bytes · __thiscall
_ZN14InfectedShoved8OnShovedEP8InfectedP11CBaseEntity
Decompiled
undefined (3 params)
/* InfectedShoved::OnShoved(Infected*, CBaseEntity*) */
InfectedShoved * __thiscall
InfectedShoved::OnShoved(InfectedShoved *this,Infected *param_1,CBaseEntity *param_2)
{
char cVar1;
int *piVar2;
int *piVar3;
Vector *pVVar4;
QAngle *pQVar5;
float fVar6;
float local_4c;
float local_48;
float local_44;
float local_40;
float local_3c;
float local_38;
QAngle local_34 [12];
float local_28;
float local_24;
float local_20;
piVar2 = (int *)(**(code **)(*(int *)param_2 + 0x594))(param_2);
if (((byte)param_2[0x14d] & 8) != 0) {
CBaseEntity::CalcAbsolutePosition(param_2);
}
local_44 = 0.0;
local_4c = *(float *)(param_1 + 0x38) - *(float *)(param_2 + 0x2e0);
local_48 = *(float *)(param_1 + 0x3c) - *(float *)(param_2 + 0x2e4);
VectorNormalize((Vector *)&local_4c);
piVar3 = (int *)(**(code **)(*(int *)param_2 + 0x570))(param_2);
(**(code **)(*piVar3 + 1000))(&local_40,piVar3);
fVar6 = local_3c * local_48 + local_40 * local_4c + local_38 * local_44;
if (0.7071 < fVar6) {
cVar1 = (**(code **)(*piVar2 + 0x100))(piVar2,0);
if (cVar1 == '\0') {
cVar1 = (**(code **)(*piVar2 + 0x100))(piVar2,2);
if (cVar1 == '\0') goto LAB_00a1c970;
cVar1 = (**(code **)(*piVar2 + 0xd8))(piVar2,0x281,1);
if (cVar1 == '\0') {
cVar1 = (**(code **)(*piVar2 + 0xd8))(piVar2,0x26e,1);
if (cVar1 == '\0') goto LAB_00a1c970;
(**(code **)(*piVar2 + 0xec))(piVar2,0);
}
(**(code **)(*piVar2 + 0xec))(piVar2,2);
}
else {
cVar1 = (**(code **)(*piVar2 + 0xd8))(piVar2,0x26e,1);
if (cVar1 == '\0') goto LAB_00a1c970;
(**(code **)(*piVar2 + 0xec))(piVar2,0);
}
pQVar5 = (QAngle *)&local_28;
pVVar4 = (Vector *)&local_4c;
}
else {
if (fVar6 < -0.7071) {
cVar1 = (**(code **)(*piVar2 + 0x100))(piVar2,0);
if (((cVar1 == '\0') && (cVar1 = (**(code **)(*piVar2 + 0x100))(piVar2,2), cVar1 == '\0')) ||
(cVar1 = (**(code **)(*piVar2 + 0xd8))(piVar2,0x26d,1), cVar1 == '\0')) goto LAB_00a1c970;
(**(code **)(*piVar2 + 0xec))(piVar2,0);
local_20 = -local_44;
local_24 = -local_48;
local_28 = -local_4c;
}
else {
if (local_40 * local_48 - local_4c * local_3c <= 0.7071) {
cVar1 = (**(code **)(*piVar2 + 0x100))(piVar2,0);
if (cVar1 == '\0') {
cVar1 = (**(code **)(*piVar2 + 0x100))(piVar2,2);
if (cVar1 == '\0') goto LAB_00a1c970;
cVar1 = (**(code **)(*piVar2 + 0xd8))(piVar2,0x283,1);
if (cVar1 == '\0') {
cVar1 = (**(code **)(*piVar2 + 0xd8))(piVar2,0x26f,1);
if (cVar1 == '\0') goto LAB_00a1c970;
(**(code **)(*piVar2 + 0xec))(piVar2,0);
}
(**(code **)(*piVar2 + 0xec))(piVar2,2);
}
else {
cVar1 = (**(code **)(*piVar2 + 0xd8))(piVar2,0x26f,1);
if (cVar1 == '\0') goto LAB_00a1c970;
(**(code **)(*piVar2 + 0xec))(piVar2,0);
}
local_28 = -local_48;
local_24 = local_4c;
}
else {
cVar1 = (**(code **)(*piVar2 + 0x100))();
if (cVar1 == '\0') {
cVar1 = (**(code **)(*piVar2 + 0x100))(piVar2,2);
if (cVar1 == '\0') goto LAB_00a1c970;
cVar1 = (**(code **)(*piVar2 + 0xd8))(piVar2,0x282,1);
if (cVar1 == '\0') {
cVar1 = (**(code **)(*piVar2 + 0xd8))(piVar2,0x270,1);
if (cVar1 == '\0') goto LAB_00a1c970;
(**(code **)(*piVar2 + 0xec))(piVar2,0);
}
(**(code **)(*piVar2 + 0xec))(piVar2,2);
}
else {
cVar1 = (**(code **)(*piVar2 + 0xd8))(piVar2,0x270,1);
if (cVar1 == '\0') goto LAB_00a1c970;
(**(code **)(*piVar2 + 0xec))(piVar2,0);
}
local_28 = local_48;
local_24 = -local_4c;
}
local_20 = 0.0;
}
pQVar5 = local_34;
pVVar4 = (Vector *)&local_28;
}
VectorAngles(pVVar4,pQVar5);
CBaseEntity::SetAbsAngles(param_2,pQVar5);
LAB_00a1c970:
*(undefined4 *)this = 4;
*(undefined4 *)(this + 4) = 0;
*(undefined4 *)(this + 8) = 0;
*(undefined4 *)(this + 0xc) = 1;
return this;
}
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.