CGameServer::BroadcastSound
0x001fc810 · 269 bytes · __thiscall
_ZN11CGameServer14BroadcastSoundER11SoundInfo_tR16IRecipientFilter
Decompiled
undefined (3 params)
/* CGameServer::BroadcastSound(SoundInfo_t&, IRecipientFilter&) */
void __thiscall
CGameServer::BroadcastSound(CGameServer *this,SoundInfo_t *param_1,IRecipientFilter *param_2)
{
CGameClient *this_00;
char cVar1;
bool bVar2;
int iVar3;
int iVar4;
int iVar5;
undefined *puVar6;
undefined *puVar7;
int iVar8;
iVar3 = (**(code **)(*(int *)param_2 + 0x10))(param_2);
cVar1 = (**(code **)(*(int *)this + 100))(this);
if (((cVar1 == '\0') || (*(int *)(developer._28_4_ + 0x30) != 0)) && (iVar8 = 0, 0 < iVar3)) {
do {
while ((iVar5 = (**(code **)(*(int *)param_2 + 0x14))(param_2,iVar8), iVar5 < 1 ||
(iVar4 = (**(code **)(*(int *)this + 0x20))(this), iVar4 < iVar5))) {
cVar1 = (**(code **)(*(int *)param_2 + 0xc))(param_2);
puVar7 = &DAT_002b6517;
if (cVar1 == '\0') {
puVar7 = &DAT_0029fe20;
}
cVar1 = (**(code **)(*(int *)param_2 + 8))(param_2);
puVar6 = &DAT_002b6517;
if (cVar1 == '\0') {
puVar6 = &DAT_0029fe20;
}
iVar8 = iVar8 + 1;
Msg("CGameServer::BroadcastSound: Recipient Filter for sound (reliable: %s, init: %s) with bogus client index (%i) in list of %i clients\n"
,puVar6,puVar7,iVar5,iVar3);
if (iVar8 == iVar3) {
return;
}
}
this_00 = *(CGameClient **)(*(int *)(this + 0x114) + -4 + iVar5 * 4);
cVar1 = (**(code **)(*(int *)this_00 + 0x74))(this_00);
if (cVar1 != '\0') {
bVar2 = (bool)(**(code **)(*(int *)param_2 + 8))(param_2);
CGameClient::SendSound(this_00,param_1,bVar2);
}
iVar8 = iVar8 + 1;
} while (iVar8 != iVar3);
}
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.