ChargerAttack::OnContact
0x00a88bc0 · 411 bytes · __thiscall
_ZN13ChargerAttack9OnContactEP7ChargerP11CBaseEntityP10CGameTrace
Decompiled
undefined (4 params)
/* ChargerAttack::OnContact(Charger*, CBaseEntity*, CGameTrace*) */
ChargerAttack * __thiscall
ChargerAttack::OnContact
(ChargerAttack *this,Charger *param_1,CBaseEntity *param_2,CGameTrace *param_3)
{
float fVar1;
uint uVar2;
char cVar3;
int iVar4;
undefined4 *puVar5;
ChargerEvade *this_00;
int *piVar6;
undefined *puVar7;
undefined1 local_28 [8];
float local_20;
if ((((param_3 != (CGameTrace *)0x0) &&
(cVar3 = (**(code **)(*(int *)param_3 + 0x16c))(param_3), cVar3 != '\0')) &&
(iVar4 = CBaseEntity::GetTeamNumber((CBaseEntity *)param_3), iVar4 == 2)) &&
(cVar3 = (**(code **)(*(int *)param_3 + 0x7e8))(param_3), cVar3 == '\0')) {
if (((byte)param_3[0x14d] & 8) != 0) {
CBaseEntity::CalcAbsolutePosition((CBaseEntity *)param_3);
}
fVar1 = *(float *)(param_3 + 0x2e8);
(**(code **)(*(int *)param_2 + 0x234))(local_28,param_2);
if (local_20 < fVar1) {
this_00 = ::operator_new(0x4818);
/* try { // try from 00a88cc9 to 00a88ccd has its CatchHandler @ 00a88d72 */
ChargerEvade::ChargerEvade(this_00);
*(undefined4 *)this = 2;
*(ChargerEvade **)(this + 4) = this_00;
*(char **)(this + 8) = "Getting out from under survivor";
*(undefined4 *)(this + 0xc) = 2;
return this;
}
uVar2 = *(uint *)(param_1 + 0x34);
if (((uVar2 != 0xffffffff) &&
(puVar7 = g_pEntityList + (uVar2 & 0xfff) * 0x10, puVar7 != (undefined *)0xfffffffc)) &&
((*(uint *)(puVar7 + 8) == uVar2 >> 0xc &&
((piVar6 = *(int **)(puVar7 + 4), piVar6 != (int *)0x0 &&
(cVar3 = (**(code **)(*piVar6 + 0x16c))(piVar6), cVar3 != '\0')))))) {
uVar2 = *(uint *)(param_1 + 0x34);
if ((uVar2 == 0xffffffff) ||
((((puVar7 = g_pEntityList + (uVar2 & 0xfff) * 0x10, puVar7 == (undefined *)0xfffffffc ||
(*(uint *)(puVar7 + 8) != uVar2 >> 0xc)) ||
(piVar6 = *(int **)(puVar7 + 4), piVar6 == (int *)0x0)) ||
(cVar3 = (**(code **)(*piVar6 + 0x16c))(piVar6), cVar3 == '\0')))) {
piVar6 = (int *)0x0;
}
cVar3 = (**(code **)(*piVar6 + 0x550))(piVar6);
if (cVar3 != '\0') goto LAB_00a88be2;
}
puVar5 = (undefined4 *)(**(code **)(*(int *)param_3 + 0xc))(param_3);
*(undefined4 *)(param_1 + 0x34) = *puVar5;
}
LAB_00a88be2:
*(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.