L L4D2node

CSoundControllerImp::CommandAdd

0x004be9d0 · 124 bytes · __thiscall

_ZN19CSoundControllerImp10CommandAddEP11CSoundPatchf15soundcommands_tff

Decompiled

undefined (6 params)

/* CSoundControllerImp::CommandAdd(CSoundPatch*, float, soundcommands_t, float, float) */

void __thiscall
CSoundControllerImp::CommandAdd
          (CSoundControllerImp *this,undefined4 param_1,float param_2,undefined4 param_4,
          undefined4 param_5,undefined4 param_6)

{
  longdouble lVar1;
  SoundCommand_t *local_10 [3];
  
  lVar1 = (longdouble)(**(code **)(*(int *)g_pEffects + 0x2c))(g_pEffects);
  local_10[0] = (SoundCommand_t *)
                CUtlMemoryPool::Alloc((CUtlMemoryPool *)SoundCommand_t::s_Allocator,0x18);
  *(float *)(local_10[0] + 4) = (float)lVar1 + param_2;
  *(undefined4 *)local_10[0] = param_1;
  *(undefined4 *)(local_10[0] + 8) = param_5;
  *(undefined4 *)(local_10[0] + 0x10) = param_6;
  *(undefined4 *)(local_10[0] + 0xc) = param_4;
  CUtlPriorityQueue<SoundCommand_t*,CDefUtlPriorityQueueLessFunc<SoundCommand_t*>,CUtlMemory<SoundCommand_t*,int>>
  ::Insert((CUtlPriorityQueue<SoundCommand_t*,CDefUtlPriorityQueueLessFunc<SoundCommand_t*>,CUtlMemory<SoundCommand_t*,int>>
            *)(this + 0x24),local_10);
  return;
}

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)