CCSPlayer::Deafen
0x00651e60 · 215 bytes · __cdecl
_ZN9CCSPlayer6DeafenEfff
Decompiled
undefined (3 params)
/* CCSPlayer::Deafen(float, float, float) */
void CCSPlayer::Deafen(float param_1,float param_2,float param_3)
{
int iVar1;
undefined4 uVar2;
undefined **local_3c [11];
iVar1 = (**(code **)(*(int *)param_1 + 0x648))(param_1);
if (iVar1 != 0) {
iVar1 = (**(code **)(*(int *)param_1 + 0x648))(param_1);
if (iVar1 != 4) {
return;
}
}
if (param_2 < 600.0) {
uVar2 = 0x86;
}
else if (800.0 <= param_2) {
uVar2 = 0x88;
if (1000.0 <= param_2) {
return;
}
}
else {
uVar2 = 0x87;
}
CRecipientFilter::CRecipientFilter((CRecipientFilter *)local_3c);
local_3c[0] = &PTR__CSingleUserRecipientFilter_00c08ea8;
/* try { // try from 00651ebd to 00651ec1 has its CatchHandler @ 00651f4a */
CRecipientFilter::AddRecipient((CRecipientFilter *)local_3c,(CBasePlayer *)param_1);
/* try { // try from 00651edc to 00651ede has its CatchHandler @ 00651f5c */
(**(code **)(*enginesound + 0x2c))(enginesound,(CRecipientFilter *)local_3c,uVar2,0);
local_3c[0] = &PTR__CSingleUserRecipientFilter_00c08ea8;
CRecipientFilter::~CRecipientFilter((CRecipientFilter *)local_3c);
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.