WitchKillIncapVictim::OnAnimationEvent
0x00a40b40 · 400 bytes · __cdecl
_ZN20WitchKillIncapVictim16OnAnimationEventEP8InfectedP11animevent_t
Decompiled
undefined (2 params)
/* WitchKillIncapVictim::OnAnimationEvent(Infected*, animevent_t*) */
Infected * WitchKillIncapVictim::OnAnimationEvent(Infected *param_1,animevent_t *param_2)
{
uint uVar1;
int iVar2;
CBaseEntity *pCVar3;
undefined *puVar4;
float fVar5;
CBaseEntity *in_stack_0000000c;
int *in_stack_00000010;
CTakeDamageInfo local_7c [108];
if (*in_stack_00000010 == 0x35) {
uVar1 = *(uint *)(param_2 + 0x34);
if ((((uVar1 != 0xffffffff) &&
(puVar4 = g_pEntityList + (uVar1 & 0xfff) * 0x10, puVar4 != (undefined *)0xfffffffc)) &&
(*(uint *)(puVar4 + 8) == uVar1 >> 0xc)) && (*(int *)(puVar4 + 4) != 0)) {
fVar5 = *(float *)(WitchDamagePerKillHit._28_4_ + 0x2c);
iVar2 = GetDifficulty();
if (iVar2 == 2) {
fVar5 = fVar5 + fVar5;
}
else if (iVar2 == 3) {
fVar5 = (float)*(int *)(SurvivorIncapacitatedHealth._28_4_ + 0x30);
}
else if (iVar2 == 0) {
fVar5 = fVar5 * 0.5;
}
CTakeDamageInfo::CTakeDamageInfo(local_7c,in_stack_0000000c,in_stack_0000000c,fVar5,4,0);
pCVar3 = (CBaseEntity *)0x0;
uVar1 = *(uint *)(param_2 + 0x34);
if (((uVar1 != 0xffffffff) &&
(puVar4 = g_pEntityList + (uVar1 & 0xfff) * 0x10, puVar4 != (undefined *)0xfffffffc)) &&
(*(uint *)(puVar4 + 8) == uVar1 >> 0xc)) {
pCVar3 = *(CBaseEntity **)(puVar4 + 4);
}
CBaseEntity::TakeDamage(pCVar3,local_7c);
pCVar3 = (CBaseEntity *)0x0;
uVar1 = *(uint *)(param_2 + 0x34);
if (((uVar1 != 0xffffffff) &&
(puVar4 = g_pEntityList + (uVar1 & 0xfff) * 0x10, puVar4 != (undefined *)0xfffffffc)) &&
(*(uint *)(puVar4 + 8) == uVar1 >> 0xc)) {
pCVar3 = *(CBaseEntity **)(puVar4 + 4);
}
CBaseEntity::EmitSound(pCVar3,"WitchZombie.ShredVictim",0.0,(float *)0x0);
}
}
*(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.