Infected::Event_Killed
0x00a11360 · 1638 bytes · __thiscall
_ZN8Infected12Event_KilledERK15CTakeDamageInfo
Decompiled
undefined (2 params)
/* Infected::Event_Killed(CTakeDamageInfo const&) */
void __thiscall Infected::Event_Killed(Infected *this,CTakeDamageInfo *param_1)
{
code *pcVar1;
CBaseEdict *pCVar2;
char cVar3;
int iVar4;
CTerrorMeleeWeapon *this_00;
char *pcVar5;
CBaseEntity *pCVar6;
Vector *pVVar7;
int iVar8;
CNavArea *pCVar9;
undefined *puVar10;
undefined4 *puVar11;
uint uVar12;
longdouble lVar13;
longdouble lVar14;
float local_28;
float local_24;
undefined4 local_20;
if (*(int *)(ZombieInvulnerability._28_4_ + 0x30) == 0) {
iVar4 = CBaseEntity::GetGender((CBaseEntity *)this);
if (iVar4 == 0xb) {
if (((byte)param_1[0x48] & 2) != 0) {
CBaseEntity::EmitSound((CBaseEntity *)this,"CEDA.suit.deflate",0.0,(float *)0x0);
}
if (((byte)this[0x1c78] & 1) != 0) {
pcVar5 = (char *)WeaponIDToClassname(0x19);
pCVar6 = (CBaseEntity *)CreateEntityByName(pcVar5,-1,true);
if (pCVar6 != (CBaseEntity *)0x0) {
DispatchSpawn(pCVar6,true);
pVVar7 = (Vector *)(**(code **)(*(int *)this + 0x288))(this);
CBaseEntity::SetAbsOrigin(pCVar6,pVVar7);
pcVar1 = *(code **)(*(int *)pCVar6 + 0x3b4);
lVar13 = (longdouble)RandomFloat(0xc2480000,0x42480000);
lVar14 = (longdouble)RandomFloat(0xc2480000,0x42480000);
local_28 = (float)lVar14;
local_20 = 0x42c80000;
local_24 = (float)lVar13;
(*pcVar1)(pCVar6,&local_28);
pCVar6[0x1458] = (CBaseEntity)0x0;
CCollisionProperty::SetSolidFlags((CCollisionProperty *)(pCVar6 + 0x194),0x98);
if (pCVar6[0x187] != (CBaseEntity)0x1) {
if (pCVar6[0x6c] == (CBaseEntity)0x0) {
pCVar2 = *(CBaseEdict **)(pCVar6 + 0x30);
if (pCVar2 != (CBaseEdict *)0x0) {
*(uint *)pCVar2 = *(uint *)pCVar2 | 0x101;
iVar4 = CBaseEdict::GetChangeAccessor(pCVar2);
*(undefined2 *)(iVar4 + 2) = 0;
}
}
else {
pCVar6[0x70] = (CBaseEntity)((byte)pCVar6[0x70] | 1);
}
pCVar6[0x187] = (CBaseEntity)0x1;
}
iVar4 = CBaseEntity::GetGender((CBaseEntity *)this);
if (iVar4 != *(int *)(pCVar6 + 0x17b8)) {
if (pCVar6[0x6c] == (CBaseEntity)0x0) {
pCVar2 = *(CBaseEdict **)(pCVar6 + 0x30);
if (pCVar2 != (CBaseEdict *)0x0) {
*(uint *)pCVar2 = *(uint *)pCVar2 | 0x101;
iVar8 = CBaseEdict::GetChangeAccessor(pCVar2);
*(undefined2 *)(iVar8 + 2) = 0;
}
}
else {
pCVar6[0x70] = (CBaseEntity)((byte)pCVar6[0x70] | 1);
}
*(int *)(pCVar6 + 0x17b8) = iVar4;
}
}
}
}
else {
iVar4 = CBaseEntity::GetGender((CBaseEntity *)this);
if (((iVar4 == 0xf) || (iVar4 = CBaseEntity::GetGender((CBaseEntity *)this), iVar4 == 0x14))
&& (((byte)this[0x1c78] & 1) != 0)) {
iVar4 = CMeleeWeaponInfoStore::GetInfoHandle
((CMeleeWeaponInfoStore *)g_MeleeWeaponInfoStore,"tonfa");
iVar8 = CMeleeWeaponInfoStore::GetInvalidHandle();
if ((iVar4 != iVar8) &&
(this_00 = (CTerrorMeleeWeapon *)CreateEntityByName("weapon_melee",-1,true),
this_00 != (CTerrorMeleeWeapon *)0x0)) {
CTerrorMeleeWeapon::SetMeleeWeaponInfoHandle(this_00,iVar4);
DispatchSpawn((CBaseEntity *)this_00,true);
pVVar7 = (Vector *)(**(code **)(*(int *)this + 0x288))(this);
CBaseEntity::SetAbsOrigin((CBaseEntity *)this_00,pVVar7);
pcVar1 = *(code **)(*(int *)this_00 + 0x3b4);
lVar13 = (longdouble)RandomFloat(0xc2480000,0x42480000);
lVar14 = (longdouble)RandomFloat(0xc2480000,0x42480000);
local_28 = (float)lVar14;
local_20 = 0x42c80000;
local_24 = (float)lVar13;
(*pcVar1)(this_00,&local_28);
this_00[0x1458] = (CTerrorMeleeWeapon)0x0;
CCollisionProperty::SetSolidFlags((CCollisionProperty *)(this_00 + 0x194),0x98);
if (this_00[0x187] != (CTerrorMeleeWeapon)0x1) {
if (this_00[0x6c] == (CTerrorMeleeWeapon)0x0) {
pCVar2 = *(CBaseEdict **)(this_00 + 0x30);
if (pCVar2 != (CBaseEdict *)0x0) {
*(uint *)pCVar2 = *(uint *)pCVar2 | 0x101;
iVar4 = CBaseEdict::GetChangeAccessor(pCVar2);
*(undefined2 *)(iVar4 + 2) = 0;
}
}
else {
this_00[0x70] = (CTerrorMeleeWeapon)((byte)this_00[0x70] | 1);
}
this_00[0x187] = (CTerrorMeleeWeapon)0x1;
}
}
}
}
if (((byte)this[0x1c74] & 0x10) != 0) {
uVar12 = 0;
puVar11 = (undefined4 *)&DAT_00f1c800;
do {
if ((*(uint *)(this + 0x1c78) >> (uVar12 & 0x1f) & 1) != 0) {
pcVar5 = (char *)WeaponIDToClassname(*puVar11);
pCVar6 = (CBaseEntity *)CreateEntityByName(pcVar5,-1,true);
if (pCVar6 != (CBaseEntity *)0x0) {
DispatchSpawn(pCVar6,true);
pVVar7 = (Vector *)(**(code **)(*(int *)this + 0x288))(this);
CBaseEntity::SetAbsOrigin(pCVar6,pVVar7);
pcVar1 = *(code **)(*(int *)pCVar6 + 0x3b4);
lVar13 = (longdouble)RandomFloat(0xc2480000,0x42480000);
lVar14 = (longdouble)RandomFloat(0xc2480000,0x42480000);
local_28 = (float)lVar14;
local_20 = 0x42c80000;
local_24 = (float)lVar13;
(*pcVar1)(pCVar6,&local_28);
pCVar6[0x1458] = (CBaseEntity)0x0;
CCollisionProperty::SetSolidFlags((CCollisionProperty *)(pCVar6 + 0x194),0x98);
if (pCVar6[0x187] != (CBaseEntity)0x1) {
if (pCVar6[0x6c] == (CBaseEntity)0x0) {
pCVar2 = *(CBaseEdict **)(pCVar6 + 0x30);
if (pCVar2 != (CBaseEdict *)0x0) {
*(uint *)pCVar2 = *(uint *)pCVar2 | 0x101;
iVar4 = CBaseEdict::GetChangeAccessor(pCVar2);
*(undefined2 *)(iVar4 + 2) = 0;
}
}
else {
pCVar6[0x70] = (CBaseEntity)((byte)pCVar6[0x70] | 1);
}
pCVar6[0x187] = (CBaseEntity)0x1;
}
iVar4 = CBaseEntity::GetGender((CBaseEntity *)this);
if (iVar4 != *(int *)(pCVar6 + 0x17b8)) {
if (pCVar6[0x6c] == (CBaseEntity)0x0) {
pCVar2 = *(CBaseEdict **)(pCVar6 + 0x30);
if (pCVar2 != (CBaseEdict *)0x0) {
*(uint *)pCVar2 = *(uint *)pCVar2 | 0x101;
iVar8 = CBaseEdict::GetChangeAccessor(pCVar2);
*(undefined2 *)(iVar8 + 2) = 0;
}
}
else {
pCVar6[0x70] = (CBaseEntity)((byte)pCVar6[0x70] | 1);
}
*(int *)(pCVar6 + 0x17b8) = iVar4;
}
}
}
uVar12 = uVar12 + 1;
puVar11 = puVar11 + 0x61;
} while (uVar12 != 4);
}
uVar12 = *(uint *)(param_1 + 0x34);
if (((uVar12 != 0xffffffff) &&
(puVar10 = g_pEntityList + (uVar12 & 0xfff) * 0x10, puVar10 != (undefined *)0xfffffffc)) &&
((*(uint *)(puVar10 + 8) == uVar12 >> 0xc &&
(*(CBaseEntity **)(puVar10 + 4) != (CBaseEntity *)0x0)))) {
iVar4 = CBaseEntity::GetTeamNumber(*(CBaseEntity **)(puVar10 + 4));
cVar3 = IsASurvivorTeam(iVar4);
if ((cVar3 != '\0') &&
(pCVar9 = (CNavArea *)(**(code **)(*(int *)this + 0x52c))(this), pCVar9 != (CNavArea *)0x0)
) {
if (((byte)this[0x14d] & 8) != 0) {
CBaseEntity::CalcAbsolutePosition((CBaseEntity *)this);
}
CNavMesh::IncreaseDangerNearby(TheNavMesh,3,1.0,pCVar9,(Vector *)(this + 0x2e0),100.0,10.0);
}
}
if (((byte)this[0x1c74] & 1) != 0) {
SetReservedWandererStatus(this,false);
}
CGlowProperty::SetGlowState((CGlowProperty *)(this + 0x1f0),0);
CDirector::OnInfectedKilled(TheDirector,(CBaseCombatCharacter *)this,param_1);
CL4DGameStats::Event_ActorKilled
((CL4DGameStats *)CL4D_GameStats,(CBaseCombatCharacter *)this,param_1);
NextBotCombatCharacter::Event_Killed((NextBotCombatCharacter *)this,param_1);
return;
}
return;
}
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.