CSoundControllerImp::SoundCreate
0x004c0360 · 362 bytes · __thiscall
_ZN19CSoundControllerImp11SoundCreateER16IRecipientFilteriPKc
Decompiled
undefined (4 params)
/* CSoundControllerImp::SoundCreate(IRecipientFilter&, int, char const*) */
CSoundPatch * __thiscall
CSoundControllerImp::SoundCreate
(CSoundControllerImp *this,IRecipientFilter *param_1,int param_2,char *param_3)
{
CSoundPatch *pCVar1;
undefined *puVar2;
uint uVar3;
undefined4 uVar4;
uint uVar5;
pCVar1 = (CSoundPatch *)CUtlMemoryPool::Alloc((CUtlMemoryPool *)CSoundPatch::s_Allocator,0x80);
*(undefined4 *)pCVar1 = 0;
*(undefined4 *)(pCVar1 + 4) = 0;
puVar2 = g_pEntityList;
*(undefined4 *)(pCVar1 + 8) = 0;
pCVar1[0xc] = (CSoundPatch)0x0;
*(undefined4 *)(pCVar1 + 0x10) = 0;
*(undefined4 *)(pCVar1 + 0x14) = 0;
*(undefined4 *)(pCVar1 + 0x18) = 0;
pCVar1[0x1c] = (CSoundPatch)0x0;
uVar4 = soundpatch_captionlength._28_4_;
*(undefined4 *)(pCVar1 + 0x38) = 0xffffffff;
*(undefined ***)(pCVar1 + 0x60) = &PTR__CCopyRecipientFilter_00c1e5c8;
*(undefined4 *)(pCVar1 + 100) = 0;
*(undefined4 *)(pCVar1 + 0x68) = 0;
*(undefined4 *)(pCVar1 + 0x6c) = 0;
*(undefined4 *)(pCVar1 + 0x70) = 0;
*(undefined4 *)(pCVar1 + 0x74) = 0;
*(undefined4 *)(pCVar1 + 0x78) = 0;
CSoundPatch::g_SoundPatchCount = CSoundPatch::g_SoundPatchCount + 1;
*(undefined4 *)(pCVar1 + 0x30) = 0;
*(undefined4 *)(pCVar1 + 0x34) = 0;
uVar4 = *(undefined4 *)(uVar4 + 0x2c);
*(undefined4 *)(pCVar1 + 0x44) = 0;
*(undefined4 *)(pCVar1 + 0x7c) = uVar4;
*(undefined4 *)(pCVar1 + 0x48) = 0;
*(undefined4 *)(pCVar1 + 0x4c) = 0;
*(undefined4 *)(pCVar1 + 0x40) = 0xffffffff;
*(undefined4 *)(pCVar1 + 0x20) = 0xffffffff;
if (param_2 == -1) {
uVar5 = 0;
uVar3 = 0;
LAB_004c0462:
puVar2 = puVar2 + uVar5 * 0x10;
if ((puVar2 != (undefined *)0xfffffffc) && (*(uint *)(puVar2 + 8) == uVar3 >> 0xc)) {
uVar4 = *(undefined4 *)(puVar2 + 4);
goto LAB_004c0478;
}
}
else {
uVar4 = 0;
if (*(int *)(puVar2 + param_2 * 0x10 + 4) == 0) goto LAB_004c0478;
uVar3 = *(int *)(puVar2 + param_2 * 0x10 + 8) << 0xc | param_2;
if (uVar3 != 0xffffffff) {
uVar5 = param_2 & 0xfff;
goto LAB_004c0462;
}
}
uVar4 = 0;
LAB_004c0478:
CSoundPatch::Init(pCVar1,param_1,uVar4,0,param_3,0x4b,0,0x3f800000);
return pCVar1;
}
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.