InfectedShoved::OnStart
0x00a1bb10 · 1698 bytes · __thiscall
_ZN14InfectedShoved7OnStartEP8InfectedP6ActionIS0_E
Decompiled
undefined (3 params)
/* InfectedShoved::OnStart(Infected*, Action<Infected>*) */
InfectedShoved * __thiscall
InfectedShoved::OnStart(InfectedShoved *this,Infected *param_1,Action *param_2)
{
uint uVar1;
CBaseEntity *this_00;
char cVar2;
int *piVar3;
undefined4 *puVar4;
int *piVar5;
Vector *pVVar6;
int iVar7;
undefined *puVar8;
QAngle *pQVar9;
float fVar10;
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;
if (((((((byte)param_2[0x1c75] & 4) != 0) &&
(uVar1 = *(uint *)(param_1 + 0x34), uVar1 != 0xffffffff)) &&
(puVar8 = g_pEntityList + (uVar1 & 0xfff) * 0x10, puVar8 != (undefined *)0xfffffffc)) &&
((*(uint *)(puVar8 + 8) == uVar1 >> 0xc &&
(this_00 = *(CBaseEntity **)(puVar8 + 4), this_00 != (CBaseEntity *)0x0)))) &&
(cVar2 = (**(code **)(*(int *)this_00 + 0x16c))(this_00), cVar2 != '\0')) {
iVar7 = CBaseEntity::GetTeamNumber(this_00);
cVar2 = IsASurvivorTeam(iVar7);
if (cVar2 != '\0') {
piVar3 = *(int **)(param_1 + 0x44);
if (piVar3 != (int *)0x0) {
(**(code **)(*piVar3 + 4))(piVar3);
}
puVar4 = ::operator_new(0x481c);
puVar4[8] = 0;
puVar4[9] = 0;
puVar4[10] = 0;
puVar4[3] = 0;
puVar4[4] = 0;
puVar4[5] = 0;
puVar4[6] = 0;
puVar4[7] = 0;
puVar4[2] = 0;
*(undefined1 *)(puVar4 + 0xc) = 0;
*(undefined1 *)((int)puVar4 + 0x31) = 0;
puVar4[0xb] = 0;
*puVar4 = &PTR__InfectedFlee_00d240a8;
puVar4[1] = &PTR__InfectedFlee_00d2420c;
/* try { // try from 00a1bc69 to 00a1bc6d has its CatchHandler @ 00a1c1f1 */
PathFollower::PathFollower((PathFollower *)(puVar4 + 0xd));
*(undefined4 **)(param_1 + 0x44) = puVar4;
}
}
piVar3 = (int *)(**(code **)(*(int *)param_2 + 0x590))(param_2);
cVar2 = (**(code **)(*piVar3 + 0x114))(piVar3);
if (cVar2 != '\0') goto LAB_00a1bb46;
piVar3 = (int *)(**(code **)(*(int *)param_2 + 0x594))(param_2);
if (((byte)param_2[0x14d] & 8) != 0) {
CBaseEntity::CalcAbsolutePosition((CBaseEntity *)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);
piVar5 = (int *)(**(code **)(*(int *)param_2 + 0x570))(param_2);
(**(code **)(*piVar5 + 1000))(&local_40,piVar5);
fVar10 = local_3c * local_48 + local_40 * local_4c + local_38 * local_44;
if (0.7071 < fVar10) {
cVar2 = (**(code **)(*piVar3 + 0x100))(piVar3,0);
if (cVar2 == '\0') {
cVar2 = (**(code **)(*piVar3 + 0x100))(piVar3,2);
if (cVar2 == '\0') {
LAB_00a1bb46:
if (*(int *)(param_1 + 0x44) == 0) {
*(undefined4 *)this = 3;
*(undefined4 *)(this + 4) = 0;
*(undefined4 *)(this + 8) = 0;
return this;
}
*(int *)(this + 4) = *(int *)(param_1 + 0x44);
*(undefined4 *)this = 1;
*(undefined4 *)(this + 8) = 0;
*(undefined4 *)(param_1 + 0x44) = 0;
return this;
}
cVar2 = (**(code **)(*piVar3 + 0xd8))(piVar3,0x281,1);
if (cVar2 == '\0') {
cVar2 = (**(code **)(*piVar3 + 0xd8))(piVar3,0x26e,1);
if (cVar2 == '\0') goto LAB_00a1bb46;
(**(code **)(*piVar3 + 0xec))(piVar3,0);
}
(**(code **)(*piVar3 + 0xec))(piVar3,2);
}
else {
cVar2 = (**(code **)(*piVar3 + 0xd8))(piVar3,0x26e,1);
if (cVar2 == '\0') goto LAB_00a1bb46;
(**(code **)(*piVar3 + 0xec))(piVar3,0);
}
pQVar9 = (QAngle *)&local_28;
pVVar6 = (Vector *)&local_4c;
}
else {
if (fVar10 < -0.7071) {
cVar2 = (**(code **)(*piVar3 + 0x100))(piVar3,0);
if (((cVar2 == '\0') && (cVar2 = (**(code **)(*piVar3 + 0x100))(piVar3,2), cVar2 == '\0')) ||
(cVar2 = (**(code **)(*piVar3 + 0xd8))(piVar3,0x26d,1), cVar2 == '\0')) goto LAB_00a1bb46;
(**(code **)(*piVar3 + 0xec))(piVar3,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) {
cVar2 = (**(code **)(*piVar3 + 0x100))(piVar3,0);
if (cVar2 == '\0') {
cVar2 = (**(code **)(*piVar3 + 0x100))(piVar3,2);
if (cVar2 == '\0') goto LAB_00a1bb46;
cVar2 = (**(code **)(*piVar3 + 0xd8))(piVar3,0x283,1);
if (cVar2 == '\0') {
cVar2 = (**(code **)(*piVar3 + 0xd8))(piVar3,0x26f,1);
if (cVar2 == '\0') goto LAB_00a1bb46;
(**(code **)(*piVar3 + 0xec))(piVar3,0);
}
(**(code **)(*piVar3 + 0xec))(piVar3,2);
}
else {
cVar2 = (**(code **)(*piVar3 + 0xd8))(piVar3,0x26f,1);
if (cVar2 == '\0') goto LAB_00a1bb46;
(**(code **)(*piVar3 + 0xec))(piVar3,0);
}
local_28 = -local_48;
local_24 = local_4c;
}
else {
cVar2 = (**(code **)(*piVar3 + 0x100))();
if (cVar2 == '\0') {
cVar2 = (**(code **)(*piVar3 + 0x100))(piVar3,2);
if (cVar2 == '\0') goto LAB_00a1bb46;
cVar2 = (**(code **)(*piVar3 + 0xd8))(piVar3,0x282,1);
if (cVar2 == '\0') {
cVar2 = (**(code **)(*piVar3 + 0xd8))(piVar3,0x270,1);
if (cVar2 == '\0') goto LAB_00a1bb46;
(**(code **)(*piVar3 + 0xec))(piVar3,0);
}
(**(code **)(*piVar3 + 0xec))(piVar3,2);
}
else {
cVar2 = (**(code **)(*piVar3 + 0xd8))(piVar3,0x270,1);
if (cVar2 == '\0') goto LAB_00a1bb46;
(**(code **)(*piVar3 + 0xec))(piVar3,0);
}
local_28 = local_48;
local_24 = -local_4c;
}
local_20 = 0.0;
}
pQVar9 = local_34;
pVVar6 = (Vector *)&local_28;
}
VectorAngles(pVVar6,pQVar9);
CBaseEntity::SetAbsAngles((CBaseEntity *)param_2,pQVar9);
CBaseEntity::EmitSound((CBaseEntity *)param_2,"Weapon.HitInfected",0.0,(float *)0x0);
iVar7 = CBaseEntity::GetTeamNumber((CBaseEntity *)param_2);
if ((iVar7 == 3) && (iVar7 = (**(code **)(*(int *)param_2 + 0x544))(param_2), iVar7 != 7)) {
Infected::Vocalize((Infected *)param_2,"Zombie.Shoved",true);
}
else if (((byte)param_2[0x153] & 8) == 0) {
CBaseEntity::EmitSound((CBaseEntity *)param_2,"WitchZombie.Rage",0.0,(float *)0x0);
}
*(undefined4 *)this = 0;
*(undefined4 *)(this + 4) = 0;
*(undefined4 *)(this + 8) = 0;
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.