CCSPlayer::HandleAnimEvent
0x00660840 · 368 bytes · __thiscall
_ZN9CCSPlayer15HandleAnimEventEP11animevent_t
Decompiled
undefined (2 params)
/* CCSPlayer::HandleAnimEvent(animevent_t*) */
void __thiscall CCSPlayer::HandleAnimEvent(CCSPlayer *this,animevent_t *param_1)
{
int iVar1;
uint uVar2;
uint uVar3;
bool bVar4;
bool bVar5;
undefined4 local_28;
undefined4 local_24;
undefined4 local_20;
iVar1 = *(int *)param_1;
if ((0x31 < iVar1) && ((iVar1 < 0x34 || (iVar1 - 0xfa1U < 2)))) {
if (((byte)this[0x14d] & 8) != 0) {
CBaseEntity::CalcAbsolutePosition((CBaseEntity *)this);
}
local_28 = *(undefined4 *)(this + 0x2e0);
local_24 = *(undefined4 *)(this + 0x2e4);
local_20 = *(undefined4 *)(this + 0x2e8);
uVar2 = (**(code **)*enginetrace)(enginetrace,&local_28,0x20,0);
bVar4 = true;
uVar2 = uVar2 >> 5 & 1;
if (uVar2 == 0) {
uVar3 = (**(code **)*enginetrace)(enginetrace,(Vector *)(this + 0x2e0),0x20,0);
bVar4 = (bool)((byte)(uVar3 >> 5) & 1);
}
bVar5 = *(int *)param_1 == 0x32;
if ((*(int *)param_1 - 0xfa1U < 2) && (*(char **)(param_1 + 4) != (char *)0x0)) {
bVar5 = **(char **)(param_1 + 4) == 'l' || bVar5;
}
if (((byte)this[0x14d] & 8) != 0) {
CBaseEntity::CalcAbsolutePosition((CBaseEntity *)this);
}
CBaseCombatCharacter::PlayFootstepSound
((CBaseCombatCharacter *)this,(Vector *)(this + 0x2e0),bVar5,bVar4,SUB41(uVar2,0),
false);
return;
}
CBasePlayer::HandleAnimEvent((CBasePlayer *)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.