InfectedExecAction::OnInjured
0x00a32f00 · 450 bytes · __cdecl
_ZN18InfectedExecAction9OnInjuredEP8InfectedRK15CTakeDamageInfo
Decompiled
undefined (2 params)
/* InfectedExecAction::OnInjured(Infected*, CTakeDamageInfo const&) */
Infected * InfectedExecAction::OnInjured(Infected *param_1,CTakeDamageInfo *param_2)
{
uint uVar1;
CBaseEntity *this;
bool bVar2;
char cVar3;
undefined *puVar4;
int iVar5;
float fVar6;
int *in_stack_0000000c;
int in_stack_00000010;
bVar2 = false;
if ((*(uint *)(in_stack_00000010 + 0x48) & 0x40) != 0) {
fVar6 = *(float *)(in_stack_00000010 + 0x3c) * 4.0;
bVar2 = *(float *)(in_stack_00000010 + 0x40) <= fVar6 &&
fVar6 != *(float *)(in_stack_00000010 + 0x40);
}
if ((((((*(uint *)(in_stack_00000010 + 0x48) & 0x20000002) != 0) &&
((float)in_stack_0000000c[0x40] < *(float *)(in_stack_00000010 + 0x3c) ||
(float)in_stack_0000000c[0x40] == *(float *)(in_stack_00000010 + 0x3c))) &&
(uVar1 = *(uint *)(in_stack_00000010 + 0x34), uVar1 != 0xffffffff)) &&
((puVar4 = g_pEntityList + (uVar1 & 0xfff) * 0x10, puVar4 != (undefined *)0xfffffffc &&
(*(uint *)(puVar4 + 8) == uVar1 >> 0xc)))) &&
((this = *(CBaseEntity **)(puVar4 + 4), this != (CBaseEntity *)0x0 &&
(cVar3 = (**(code **)(*(int *)this + 0x16c))(this), cVar3 != '\0')))) {
iVar5 = CBaseEntity::GetTeamNumber(this);
cVar3 = IsASurvivorTeam(iVar5);
if (((cVar3 != '\0') && (this[0x33bc] != (CBaseEntity)0x0)) &&
(*(int *)(z_minigun_atomize._28_4_ + 0x30) != 0)) goto LAB_00a33050;
}
if (!bVar2) {
if ((*(uint *)(in_stack_00000010 + 0x48) & 0x20000187) != 0) {
CBaseAnimatingOverlay::AddGesture();
}
*(undefined4 *)param_1 = 0;
*(undefined4 *)(param_1 + 4) = 0;
*(undefined4 *)(param_1 + 8) = 0;
*(undefined4 *)(param_1 + 0xc) = 1;
return param_1;
}
LAB_00a33050:
if (in_stack_0000000c[0x40] != -1) {
(**(code **)(*in_stack_0000000c + 0x214))();
in_stack_0000000c[0x40] = -1;
}
(**(code **)(*in_stack_0000000c + 0x4dc))();
*(undefined4 *)param_1 = 3;
*(undefined4 *)(param_1 + 4) = 0;
*(undefined4 *)(param_1 + 8) = 0;
*(undefined4 *)(param_1 + 0xc) = 3;
return param_1;
}
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.