CBaseCombatWeapon::StopWeaponSound
0x00406ba0 · 306 bytes · __thiscall
_ZN17CBaseCombatWeapon15StopWeaponSoundE13WeaponSound_t
Decompiled
undefined (2 params)
/* CBaseCombatWeapon::StopWeaponSound(WeaponSound_t) */
void __thiscall CBaseCombatWeapon::StopWeaponSound(CBaseCombatWeapon *this,undefined4 param_2)
{
char cVar1;
char *pcVar2;
int iVar3;
int in_GS_OFFSET;
undefined4 local_b8;
undefined4 local_b4;
undefined4 local_b0;
undefined4 local_ac;
undefined4 local_a8;
undefined4 local_a4;
char local_a0;
undefined4 local_9c;
undefined1 local_98;
undefined4 local_18;
undefined4 local_14;
int local_10;
local_10 = *(int *)(in_GS_OFFSET + 0x14);
pcVar2 = (char *)(**(code **)(*(int *)this + 0x540))(this,param_2);
if ((pcVar2 == (char *)0x0) || (*pcVar2 == '\0')) goto LAB_00406bd6;
local_b8 = 0;
local_b4 = 0x3f800000;
local_b0 = 100;
local_ac = 100;
local_a8 = 100;
local_a4 = 0x4b;
local_98 = 0;
local_a0 = '\0';
local_9c = 0;
local_18 = 0;
local_14 = 0;
cVar1 = CBaseEntity::GetParametersForSound(pcVar2,(CSoundParameters *)&local_b8,(char *)0x0);
if (cVar1 == '\0') goto LAB_00406bd6;
if (local_a0 == '\0') {
iVar3 = GetOwner(this);
if (iVar3 != 0) goto LAB_00406c8d;
iVar3 = *(int *)(this + 0x30);
if (iVar3 == 0) goto LAB_00406cd0;
LAB_00406c9c:
iVar3 = iVar3 - *(int *)(gpGlobals + 0x58) >> 4;
}
else {
iVar3 = GetOwner(this);
if (iVar3 == 0) goto LAB_00406bd6;
LAB_00406c8d:
iVar3 = GetOwner(this);
iVar3 = *(int *)(iVar3 + 0x30);
if (iVar3 != 0) goto LAB_00406c9c;
LAB_00406cd0:
iVar3 = 0;
}
CBaseEntity::StopSound(iVar3,pcVar2);
LAB_00406bd6:
if (local_10 == *(int *)(in_GS_OFFSET + 0x14)) {
return;
}
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
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.