CEngineSoundServer::PrefetchSound
0x00158150 · 246 bytes · __thiscall
_ZN18CEngineSoundServer13PrefetchSoundEPKc
Decompiled
undefined (2 params)
/* CEngineSoundServer::PrefetchSound(char const*) */
void __thiscall CEngineSoundServer::PrefetchSound(CEngineSoundServer *this,char *param_1)
{
byte bVar1;
int iVar2;
byte *pbVar3;
undefined **local_5c;
undefined1 local_58;
undefined4 local_54;
undefined4 local_50;
undefined4 local_4c;
undefined8 local_48;
undefined4 local_40;
undefined4 local_3c;
undefined8 local_38;
undefined4 local_30;
undefined4 local_2c;
undefined1 local_28;
undefined8 local_24;
undefined4 local_1c;
undefined4 local_18;
undefined2 local_10;
undefined2 local_e;
pbVar3 = (byte *)param_1;
if (param_1 != (char *)0x0) {
do {
bVar1 = *pbVar3;
if ((bVar1 & 0xfd) == 0x21) {
LAB_001581b0:
if (bVar1 == 0x21) {
return;
}
}
else if (2 < (byte)(bVar1 - 0x28)) {
if (((byte)(bVar1 - 0x3e) < 3) || (bVar1 == 0x3c)) goto LAB_001581b0;
if (((bVar1 != 0x5e) && (bVar1 != 0x7d)) && (bVar1 != 0x24)) break;
}
pbVar3 = pbVar3 + 1;
} while( true );
}
iVar2 = SV_SoundIndex(param_1);
if (iVar2 != 0) {
local_e = (undefined2)iVar2;
local_50 = 0;
local_4c = 0;
local_48 = 0;
local_40 = 0;
local_3c = 0;
local_38 = 0;
local_30 = 0;
local_2c = 0;
local_28 = 0;
local_24 = 0;
local_1c = 0;
local_18 = 0;
local_58 = 1;
local_54 = 0;
local_5c = &PTR__SVC_Prefetch_002a1e28;
local_10 = 0;
CBaseServer::BroadcastMessage((CBaseServer *)&sv,(INetMessage *)&local_5c,true,false);
}
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.