CTerrorPlayer::HandleAnimEvent
0x009ddc50 · 666 bytes · __thiscall
_ZN13CTerrorPlayer15HandleAnimEventEP11animevent_t
Decompiled
undefined (2 params)
/* CTerrorPlayer::HandleAnimEvent(animevent_t*) */
void __thiscall CTerrorPlayer::HandleAnimEvent(CTerrorPlayer *this,animevent_t *param_1)
{
int iVar1;
uint uVar2;
CBaseEntity *this_00;
code *pcVar3;
char cVar4;
undefined *puVar5;
CAI_Concept local_84 [8];
CTakeDamageInfo local_7c [108];
if ((*(uint *)(param_1 + 0x10) & 0x401) == 0x401) {
if ((*(uint *)(param_1 + 0x10) & 8) != 0) {
(**(code **)(*(int *)this + 0x460))(this,param_1);
return;
}
iVar1 = *(int *)param_1;
if (iVar1 == 0x45) {
uVar2 = *(uint *)(this + 0x2d60);
if ((((uVar2 != 0xffffffff) &&
(puVar5 = g_pEntityList + (uVar2 & 0xfff) * 0x10, puVar5 != (undefined *)0xfffffffc)) &&
(*(uint *)(puVar5 + 8) == uVar2 >> 0xc)) && (*(int *)(puVar5 + 4) != 0)) {
return;
}
}
else {
if (iVar1 == 0x38) {
return;
}
if (iVar1 == 0x46) {
uVar2 = *(uint *)(this + 0x3e44);
if (((uVar2 != 0xffffffff) &&
(puVar5 = g_pEntityList + (uVar2 & 0xfff) * 0x10, puVar5 != (undefined *)0xfffffffc)) &&
((*(uint *)(puVar5 + 8) == uVar2 >> 0xc &&
(this_00 = *(CBaseEntity **)(puVar5 + 4), this_00 != (CBaseEntity *)0x0)))) {
CBaseEntity::EmitSound((CBaseEntity *)this,"ChargerZombie.Pummel",0.0,(float *)0x0);
GetDifficulty();
CTakeDamageInfo::CTakeDamageInfo
(local_7c,(CBaseEntity *)this,(CBaseEntity *)this,
*(float *)(z_charger_pound_dmg._28_4_ + 0x2c),0x80,0);
CBaseEntity::TakeDamage(this_00,local_7c);
cVar4 = (**(code **)(*(int *)this_00 + 0x16c))(this_00);
if (cVar4 != '\0') {
pcVar3 = *(code **)(*(int *)this_00 + 0x7b4);
CAI_Concept::CAI_Concept(local_84,"chargerpound");
(*pcVar3)(this_00,local_84,1,0,0,0,0);
}
}
if (((byte)this[0x14d] & 8) != 0) {
CBaseEntity::CalcAbsolutePosition((CBaseEntity *)this);
}
UTIL_ScreenShake(this + 0x2e0,0x40200000,0x42960000,0x3f800000,0x42900000,0,0,0);
return;
}
if (iVar1 == 0x47) {
CBaseEntity::EmitSound((CBaseEntity *)this,"ChargerZombie.VocalizePummel",0.0,(float *)0x0);
return;
}
if (iVar1 == 0x48) {
CBaseEntity::EmitSound((CBaseEntity *)this,"ChargerZombie.Pummel",0.0,(float *)0x0);
return;
}
}
CCSPlayer::HandleAnimEvent((CCSPlayer *)this,param_1);
}
CCSPlayer::HandleAnimEvent((CCSPlayer *)this,param_1);
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.