CBaseShotgun::PlayReloadAnim
0x00527200 · 340 bytes · __thiscall
_ZN12CBaseShotgun14PlayReloadAnimE8Activity17PlayerAnimEvent_ti
Decompiled
undefined (4 params)
/* CBaseShotgun::PlayReloadAnim(Activity, PlayerAnimEvent_t, int) */
void __thiscall
CBaseShotgun::PlayReloadAnim(CBaseShotgun *this,int param_2,undefined4 param_3,undefined4 param_4)
{
CBaseEdict *this_00;
CBasePlayer *this_01;
CBaseAnimatingOverlay *this_02;
int iVar1;
longdouble lVar2;
this_01 = (CBasePlayer *)CTerrorWeapon::GetPlayerOwner((CTerrorWeapon *)this);
if (this_01 == (CBasePlayer *)0x0) {
return;
}
(**(code **)(*(int *)this_01 + 0x7fc))(this_01,param_3,param_4);
if (param_2 != 0x588) {
if (param_2 == 0x58a) {
PlayReloadSoundEffects(this_01,0x58a,this,0x11);
goto LAB_0052725e;
}
if (param_2 != 0xc1) goto LAB_0052725e;
}
PlayReloadSoundEffects(this_01,param_2,this,6);
LAB_0052725e:
(**(code **)(*(int *)this + 0x3f0))(this,param_2);
lVar2 = (longdouble)(**(code **)(*(int *)this + 0x59c))(this);
if (1.0 / (float)lVar2 != *(float *)(this + 0x468)) {
if (this[0x6c] == (CBaseShotgun)0x0) {
this_00 = *(CBaseEdict **)(this + 0x30);
if (this_00 != (CBaseEdict *)0x0) {
*(uint *)this_00 = *(uint *)this_00 | 0x101;
iVar1 = CBaseEdict::GetChangeAccessor(this_00);
*(undefined2 *)(iVar1 + 2) = 0;
}
}
else {
this[0x70] = (CBaseShotgun)((byte)this[0x70] | 1);
}
*(float *)(this + 0x468) = 1.0 / (float)lVar2;
}
this_02 = (CBaseAnimatingOverlay *)CBasePlayer::GetViewModel(this_01,*(int *)(this + 0x13f8));
if ((this_02 != (CBaseAnimatingOverlay *)0x0) &&
(iVar1 = CBaseAnimatingOverlay::GetAnimOverlay(this_02,0), iVar1 != 0)) {
*(undefined4 *)(iVar1 + 0x18) = *(undefined4 *)(this + 0x468);
}
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.