L L4D2node

CSoundControllerImp::SaveSoundPatch

0x004be830 · 327 bytes · __thiscall

_ZN19CSoundControllerImp14SaveSoundPatchEP11CSoundPatchP5ISave

Decompiled

undefined (3 params)

/* CSoundControllerImp::SaveSoundPatch(CSoundPatch*, ISave*) */

void __thiscall
CSoundControllerImp::SaveSoundPatch(CSoundControllerImp *this,CSoundPatch *param_1,ISave *param_2)

{
  int *piVar1;
  int iVar2;
  int iVar3;
  int local_20 [4];
  
  (**(code **)(*(int *)param_2 + 0x20))(param_2);
  (**(code **)(*(int *)param_2 + 0x14))(param_2,param_1,CSoundPatch::m_DataMap);
  (**(code **)(*(int *)param_2 + 0x24))(param_2);
  local_20[0] = 0;
  iVar2 = *(int *)(this + 0x30) + -1;
  if (-1 < iVar2) {
    do {
      while ((CSoundPatch *)**(int **)(*(int *)(this + 0x24) + iVar2 * 4) != param_1) {
        iVar2 = iVar2 + -1;
        if (iVar2 == -1) goto LAB_004be8c0;
      }
      local_20[0] = local_20[0] + 1;
      iVar2 = iVar2 + -1;
    } while (iVar2 != -1);
  }
LAB_004be8c0:
  (**(code **)(*(int *)param_2 + 0x20))(param_2);
  (**(code **)(*(int *)param_2 + 0x2c))(param_2,local_20,1);
  iVar2 = *(int *)(this + 0x30) + -1;
  iVar3 = iVar2 * 4;
  if (-1 < iVar2) {
    do {
      piVar1 = *(int **)(*(int *)(this + 0x24) + iVar3);
      if ((CSoundPatch *)*piVar1 == param_1) {
        (**(code **)(*(int *)param_2 + 0x20))(param_2);
        (**(code **)(*(int *)param_2 + 0x14))(param_2,piVar1,SoundCommand_t::m_DataMap);
        (**(code **)(*(int *)param_2 + 0x24))(param_2);
      }
      iVar2 = iVar2 + -1;
      iVar3 = iVar3 + -4;
    } while (iVar2 != -1);
  }
  (**(code **)(*(int *)param_2 + 0x24))(param_2);
  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)