L L4D2node

CSoundControllerImp::Play

0x004bf290 · 177 bytes · __thiscall

_ZN19CSoundControllerImp4PlayEP11CSoundPatchfff

Decompiled

undefined (5 params)

/* CSoundControllerImp::Play(CSoundPatch*, float, float, float) */

void __thiscall
CSoundControllerImp::Play
          (CSoundControllerImp *this,CSoundPatch *param_1,float param_2,float param_3,float param_4)

{
  float fVar1;
  
  fVar1 = param_2;
  if (1.0 <= param_2) {
    fVar1 = 1.0;
  }
  *(uint *)(param_1 + 0x50) = *(uint *)(param_1 + 0x50) | 1;
  *(undefined4 *)(param_1 + 0x28) = 0;
  CSoundEnvelope::SetTarget((CSoundEnvelope *)(param_1 + 0x10),fVar1,0.0);
  *(uint *)(param_1 + 0x50) = *(uint *)(param_1 + 0x50) | 2;
  CSoundEnvelope::SetTarget((CSoundEnvelope *)param_1,param_3,0.0);
  if (*(int *)(param_1 + 0x58) == 0) {
    CUtlVector<CSoundPatch*,CUtlMemory<CSoundPatch*,int>>::InsertBefore
              ((CUtlVector<CSoundPatch*,CUtlMemory<CSoundPatch*,int>> *)(this + 0x10),
               *(int *)(this + 0x1c),&param_1);
    CSoundPatch::StartSound(param_1,param_4);
    return;
  }
  (**(code **)(*(int *)this + 0x10))(this,param_1);
  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)