InfectedWander::OnInjured
0x00a38ef0 · 529 bytes · __cdecl
_ZN14InfectedWander9OnInjuredEP8InfectedRK15CTakeDamageInfo
Decompiled
undefined (2 params)
/* InfectedWander::OnInjured(Infected*, CTakeDamageInfo const&) */
Infected * InfectedWander::OnInjured(Infected *param_1,CTakeDamageInfo *param_2)
{
uint uVar1;
char cVar2;
int iVar3;
InfectedAlert *this;
int *piVar4;
CBaseEntity *pCVar5;
undefined *puVar6;
CBaseEntity *this_00;
int *in_stack_0000000c;
int in_stack_00000010;
undefined4 local_28;
undefined4 local_24;
undefined4 local_20;
uVar1 = *(uint *)(in_stack_00000010 + 0x34);
if ((((uVar1 != 0xffffffff) &&
(puVar6 = g_pEntityList + (uVar1 & 0xfff) * 0x10, puVar6 != (undefined *)0xfffffffc)) &&
(*(uint *)(puVar6 + 8) == uVar1 >> 0xc)) &&
(pCVar5 = *(CBaseEntity **)(puVar6 + 4), pCVar5 != (CBaseEntity *)0x0)) {
cVar2 = (**(code **)(*(int *)pCVar5 + 0x16c))(pCVar5);
if (cVar2 == '\0') {
piVar4 = (int *)__dynamic_cast(pCVar5,&CBaseEntity::typeinfo,&INextBot::typeinfo,0xfffffffe);
if (piVar4 != (int *)0x0) {
pCVar5 = (CBaseEntity *)(**(code **)(*piVar4 + 0xb4))(piVar4);
this = ::operator_new(0x48);
/* try { // try from 00a39062 to 00a39066 has its CatchHandler @ 00a3910a */
InfectedAttack::InfectedAttack((InfectedAttack *)this,pCVar5);
goto LAB_00a39067;
}
}
else {
cVar2 = (**(code **)(*(int *)pCVar5 + 0x16c))(pCVar5);
this_00 = (CBaseEntity *)0x0;
if (cVar2 != '\0') {
this_00 = pCVar5;
}
iVar3 = CBaseEntity::GetTeamNumber(this_00);
cVar2 = IsASurvivorTeam(iVar3);
if (cVar2 != '\0') {
if ((*(byte *)((int)in_stack_0000000c + 0x1c75) & 4) == 0) {
cVar2 = (**(code **)(*in_stack_0000000c + 0x58c))(in_stack_0000000c);
if (cVar2 == '\0') goto LAB_00a38f29;
(**(code **)(*(int *)this_00 + 0x234))(&local_28,this_00);
*(undefined4 *)(this_00 + 0x31c8) = local_28;
*(undefined4 *)(this_00 + 0x31cc) = local_24;
*(undefined4 *)(this_00 + 0x31d0) = local_20;
this = ::operator_new(0x80);
/* try { // try from 00a3900e to 00a39012 has its CatchHandler @ 00a3911c */
InfectedAlert::InfectedAlert(this,this_00 + 0x31c8,1);
}
else {
this = ::operator_new(0x481c);
*(undefined4 *)(this + 0x20) = 0;
*(undefined4 *)(this + 0x24) = 0;
*(undefined4 *)(this + 0x28) = 0;
*(undefined4 *)(this + 0xc) = 0;
*(undefined4 *)(this + 0x10) = 0;
*(undefined4 *)(this + 0x14) = 0;
*(undefined4 *)(this + 0x18) = 0;
*(undefined4 *)(this + 0x1c) = 0;
*(undefined4 *)(this + 8) = 0;
this[0x30] = (InfectedAlert)0x0;
this[0x31] = (InfectedAlert)0x0;
*(undefined4 *)(this + 0x2c) = 0;
*(undefined ***)this = &PTR__InfectedFlee_00d240a8;
*(undefined ***)(this + 4) = &PTR__InfectedFlee_00d2420c;
/* try { // try from 00a39100 to 00a39104 has its CatchHandler @ 00a3911e */
PathFollower::PathFollower((PathFollower *)(this + 0x34));
}
LAB_00a39067:
*(undefined4 *)param_1 = 1;
*(InfectedAlert **)(param_1 + 4) = this;
*(undefined4 *)(param_1 + 8) = 0;
*(undefined4 *)(param_1 + 0xc) = 1;
return param_1;
}
}
}
LAB_00a38f29:
*(undefined4 *)param_1 = 0;
*(undefined4 *)(param_1 + 4) = 0;
*(undefined4 *)(param_1 + 8) = 0;
*(undefined4 *)(param_1 + 0xc) = 1;
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.