soundscape_flush
0x00830c40 · 253 bytes · __cdecl
_ZL16soundscape_flushRK8CCommand
Decompiled
undefined (1 param)
/* soundscape_flush(CCommand const&) */
void soundscape_flush(CCommand *param_1)
{
char cVar1;
int *piVar2;
int *piVar3;
int iVar4;
int iVar5;
piVar2 = (int *)UTIL_GetCommandClient();
if ((piVar2 == (int *)0x0) || (cVar1 = (**(code **)(*piVar2 + 0x16c))(piVar2), cVar1 == '\0')) {
cVar1 = (**(code **)(*engine + 8))(engine);
if (cVar1 == '\0') {
return;
}
piVar2 = (int *)0x0;
}
else {
cVar1 = (**(code **)(*engine + 8))(engine);
if (cVar1 != '\0') {
return;
}
piVar3 = (int *)UTIL_GetListenServerHost();
if (piVar2 != piVar3) {
return;
}
}
g_SoundscapeSystem._16_4_ = 0;
CStringRegistry::ClearStrings((CStringRegistry *)(g_SoundscapeSystem + 0xc));
CSoundscapeSystem::Init((CSoundscapeSystem *)g_SoundscapeSystem);
cVar1 = (**(code **)(*engine + 8))(engine);
if (cVar1 == '\0') {
(**(code **)(*engine + 0x9c))(engine,piVar2[0xc],"cl_soundscape_flush\n");
return;
}
if (*(int *)(gpGlobals + 0x14) < 1) {
return;
}
iVar5 = 1;
do {
iVar4 = UTIL_PlayerByIndex(iVar5);
if (iVar4 != 0) {
(**(code **)(*engine + 0x9c))(engine,*(undefined4 *)(iVar4 + 0x30),"cl_soundscape_flush\n");
}
iVar5 = iVar5 + 1;
} while (iVar5 <= *(int *)(gpGlobals + 0x14));
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.