sv_findsoundname
0x004b1fc0 · 327 bytes · __cdecl
_ZL16sv_findsoundnameRK8CCommand
Decompiled
undefined (1 param)
/* sv_findsoundname(CCommand const&) */
void sv_findsoundname(CCommand *param_1)
{
char cVar1;
int iVar2;
undefined4 *puVar3;
uint uVar4;
char *pcVar5;
int iVar6;
undefined4 uVar7;
undefined4 uVar8;
ushort uVar9;
undefined4 *puVar10;
int iVar11;
char *local_2c;
int local_20;
cVar1 = UTIL_IsCommandIssuedByServerAdmin();
if ((cVar1 != '\0') && (*(int *)param_1 == 2)) {
iVar2 = (**(code **)(*soundemitterbase + 0x24))(soundemitterbase);
if (*(int *)param_1 < 2) {
local_2c = "";
}
else {
local_2c = *(char **)(param_1 + 0x40c);
if (local_2c == (char *)0x0) {
return;
}
}
if (0 < iVar2) {
local_20 = 0;
do {
puVar3 = (undefined4 *)(**(code **)(*soundemitterbase + 0x58))(soundemitterbase,local_20);
if ((puVar3 != (undefined4 *)0x0) && (uVar9 = *(ushort *)(puVar3 + 2), uVar9 != 0)) {
uVar4 = (uint)uVar9;
iVar11 = 0;
while( true ) {
puVar10 = puVar3;
if (uVar9 != 1) {
puVar10 = (undefined4 *)*puVar3;
}
pcVar5 = (char *)(**(code **)(*soundemitterbase + 0x30))
(soundemitterbase,puVar10 + iVar11);
iVar6 = V_stristr(pcVar5,local_2c);
if (iVar6 != 0) {
uVar7 = (**(code **)(*soundemitterbase + 0x28))(soundemitterbase,local_20);
uVar8 = (**(code **)(*soundemitterbase + 0x48))(soundemitterbase,local_20);
Msg("Referenced by \'%s:%s\' -- %s\n",uVar8,uVar7,pcVar5);
}
if (iVar11 == uVar4 - 1) break;
uVar9 = *(ushort *)(puVar3 + 2);
iVar11 = iVar11 + 1;
}
}
local_20 = local_20 + 1;
} while (local_20 != iVar2);
return;
}
}
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.