L L4D2node

CSoundPatch::Shutdown

0x004bde70 · 145 bytes · __thiscall

_ZN11CSoundPatch8ShutdownEv.part.29

Decompiled

undefined (1 param)

/* CSoundPatch::Shutdown() [clone .part.29] */

void __thiscall CSoundPatch::Shutdown(CSoundPatch *this)

{
  uint uVar1;
  int in_EAX;
  int iVar2;
  undefined *puVar3;
  char *pcVar4;
  
  uVar1 = *(uint *)(in_EAX + 0x38);
  if ((((uVar1 == 0xffffffff) ||
       (puVar3 = g_pEntityList + (uVar1 & 0xfff) * 0x10, puVar3 == (undefined *)0xfffffffc)) ||
      (*(uint *)(puVar3 + 8) != uVar1 >> 0xc)) || (*(int *)(puVar3 + 4) == 0)) {
    iVar2 = *(int *)(in_EAX + 0x40);
LAB_004bdeb0:
    if (iVar2 < 0) goto LAB_004bded4;
  }
  else {
    iVar2 = *(int *)(*(int *)(puVar3 + 4) + 0x30);
    if (iVar2 != 0) {
      iVar2 = iVar2 - *(int *)(gpGlobals + 0x58) >> 4;
      goto LAB_004bdeb0;
    }
    iVar2 = 0;
  }
  pcVar4 = "";
  if (*(char **)(in_EAX + 0x30) != (char *)0x0) {
    pcVar4 = *(char **)(in_EAX + 0x30);
  }
  CBaseEntity::StopSound(iVar2,*(int *)(in_EAX + 0x3c),pcVar4);
LAB_004bded4:
  *(undefined4 *)(in_EAX + 0x58) = 0;
  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)