InfectedAlert::OnContact
0x00a19350 · 543 bytes · __thiscall
_ZN13InfectedAlert9OnContactEP8InfectedP11CBaseEntityP10CGameTrace
Decompiled
undefined (4 params)
/* InfectedAlert::OnContact(Infected*, CBaseEntity*, CGameTrace*) */
InfectedAlert * __thiscall
InfectedAlert::OnContact
(InfectedAlert *this,Infected *param_1,CBaseEntity *param_2,CGameTrace *param_3)
{
undefined4 uVar1;
char cVar2;
int iVar3;
InfectedAttack *this_00;
undefined4 *puVar4;
undefined4 *puVar5;
CBaseEntity *this_01;
if (((param_3 != (CGameTrace *)0x0) &&
(cVar2 = (**(code **)(*(int *)param_3 + 300))(param_3), cVar2 != '\0')) &&
(cVar2 = (**(code **)(*(int *)param_3 + 0x16c))(param_3), cVar2 != '\0')) {
cVar2 = (**(code **)(*(int *)param_3 + 0x16c))(param_3);
this_01 = (CBaseEntity *)0x0;
if (cVar2 != '\0') {
this_01 = (CBaseEntity *)param_3;
}
iVar3 = CBaseEntity::GetTeamNumber(this_01);
cVar2 = IsASurvivorTeam(iVar3);
if (cVar2 == '\0') {
puVar4 = ::operator_new(0x48);
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__InfectedShoved_00d21b88;
puVar4[1] = &PTR__InfectedShoved_00d21cec;
puVar4[0xd] = 0xffffffff;
/* try { // try from 00a194ad to 00a194bf has its CatchHandler @ 00a1958c */
puVar5 = (undefined4 *)(**(code **)(*(int *)param_3 + 0xc))(param_3);
puVar4[0xd] = *puVar5;
puVar5 = (undefined4 *)(**(code **)(*(int *)param_3 + 0x288))(param_3);
uVar1 = *puVar5;
*(undefined4 *)this = 2;
*(undefined4 **)(this + 4) = puVar4;
puVar4[0xe] = uVar1;
uVar1 = puVar5[1];
*(undefined4 *)(this + 8) = 0;
*(undefined4 *)(this + 0xc) = 1;
puVar4[0xf] = uVar1;
uVar1 = puVar5[2];
puVar4[0x11] = 0;
puVar4[0x10] = uVar1;
return this;
}
if (((byte)param_2[0x1c75] & 4) == 0) {
cVar2 = (**(code **)(*(int *)param_2 + 0x58c))(param_2);
if (cVar2 == '\0') goto LAB_00a19372;
this_00 = ::operator_new(0x48);
/* try { // try from 00a19413 to 00a19417 has its CatchHandler @ 00a1957a */
InfectedAttack::InfectedAttack(this_00,this_01);
}
else {
this_00 = ::operator_new(0x481c);
*(undefined4 *)(this_00 + 0x20) = 0;
*(undefined4 *)(this_00 + 0x24) = 0;
*(undefined4 *)(this_00 + 0x28) = 0;
*(undefined4 *)(this_00 + 0xc) = 0;
*(undefined4 *)(this_00 + 0x10) = 0;
*(undefined4 *)(this_00 + 0x14) = 0;
*(undefined4 *)(this_00 + 0x18) = 0;
*(undefined4 *)(this_00 + 0x1c) = 0;
*(undefined4 *)(this_00 + 8) = 0;
this_00[0x30] = (InfectedAttack)0x0;
this_00[0x31] = (InfectedAttack)0x0;
*(undefined4 *)(this_00 + 0x2c) = 0;
*(undefined ***)this_00 = &PTR__InfectedFlee_00d240a8;
*(undefined ***)(this_00 + 4) = &PTR__InfectedFlee_00d2420c;
/* try { // try from 00a19570 to 00a19574 has its CatchHandler @ 00a195a6 */
PathFollower::PathFollower((PathFollower *)(this_00 + 0x34));
}
*(undefined4 *)this = 1;
*(InfectedAttack **)(this + 4) = this_00;
*(undefined4 *)(this + 8) = 0;
*(undefined4 *)(this + 0xc) = 1;
return this;
}
LAB_00a19372:
*(undefined4 *)this = 0;
*(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.