L L4D2node

CEngineSoundServer::SetPlayerDSP

0x00158060 · 188 bytes · __thiscall

_ZN18CEngineSoundServer12SetPlayerDSPER16IRecipientFilterib

Decompiled

undefined (4 params)

/* CEngineSoundServer::SetPlayerDSP(IRecipientFilter&, int, bool) */

void __thiscall
CEngineSoundServer::SetPlayerDSP
          (CEngineSoundServer *this,IRecipientFilter *param_1,int param_2,bool param_3)

{
  int iVar1;
  int local_30 [8];
  
  if (param_3) {
    Warning("SetPlayerDSP:  fastReset only valid from client\n");
  }
  local_30[0] = 0;
  local_30[1] = 0;
  local_30[2] = 0;
  local_30[3] = 0;
  local_30[4] = 0;
                    /* try { // try from 001580a6 to 001580dd has its CatchHandler @ 00158121 */
  BuildRecipientList((CUtlVector *)local_30,param_1);
  iVar1 = 0;
  if (0 < local_30[3]) {
    do {
      (**(code **)(*(int *)g_pVEngineServer + 0x9c))
                (g_pVEngineServer,*(undefined4 *)(local_30[0] + iVar1 * 4),"dsp_player %i\n",param_2
                );
      iVar1 = iVar1 + 1;
    } while (iVar1 < local_30[3]);
  }
  local_30[3] = 0;
  CUtlMemory<edict_t*,int>::Purge((CUtlMemory<edict_t*,int> *)local_30);
  local_30[4] = local_30[0];
  CUtlMemory<edict_t*,int>::Purge((CUtlMemory<edict_t*,int> *)local_30);
  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)