L L4D2node

CSoundControllerImp::SoundCreate

0x004c0840 · 360 bytes · __thiscall

_ZN19CSoundControllerImp11SoundCreateER16IRecipientFilteriiPKc12soundlevel_t

Decompiled

undefined (6 params)

/* CSoundControllerImp::SoundCreate(IRecipientFilter&, int, int, char const*, soundlevel_t) */

CSoundPatch * __thiscall
CSoundControllerImp::SoundCreate
          (undefined4 this,undefined4 param_1,uint param_2,undefined4 param_3,undefined4 param_4,
          undefined4 param_6)

{
  CSoundPatch *pCVar1;
  undefined *puVar2;
  uint uVar3;
  undefined4 uVar4;
  
  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 == 0xffffffff) {
    param_2 = 0;
    uVar3 = 0;
LAB_004c0942:
    puVar2 = puVar2 + param_2 * 0x10;
    if ((puVar2 != (undefined *)0xfffffffc) && (*(uint *)(puVar2 + 8) == uVar3 >> 0xc)) {
      uVar4 = *(undefined4 *)(puVar2 + 4);
      goto LAB_004c0958;
    }
  }
  else {
    uVar4 = 0;
    if (*(int *)(puVar2 + param_2 * 0x10 + 4) == 0) goto LAB_004c0958;
    uVar3 = *(int *)(puVar2 + param_2 * 0x10 + 8) << 0xc | param_2;
    if (uVar3 != 0xffffffff) {
      param_2 = param_2 & 0xfff;
      goto LAB_004c0942;
    }
  }
  uVar4 = 0;
LAB_004c0958:
  CSoundPatch::Init(pCVar1,param_1,uVar4,param_3,param_4,param_6,0,0x3f800000);
  return pCVar1;
}

SourceMod gamedata

paste into addons/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.



        

        

          

Type inference is best-effort from the C signature - sanity-check the DHooks types before shipping.

Return-type handling cheatsheet (DHookReturn)