L L4D2node

CTriggerCDAudio::PlayTrack

0x00b1b8c0 · 169 bytes · __thiscall

_ZN15CTriggerCDAudio9PlayTrackEv

Decompiled

undefined (1 param)

/* CTriggerCDAudio::PlayTrack() */

void __thiscall CTriggerCDAudio::PlayTrack(CTriggerCDAudio *this)

{
  int iVar1;
  int iVar2;
  
  iVar2 = *(int *)(gpGlobals + 0x58);
  iVar1 = *(int *)(this + 0x100);
  if (((iVar2 != 0) && ((*(byte *)(iVar2 + 0x10) & 2) == 0)) && (iVar2 = iVar2 + 0x10, iVar2 != 0))
  {
    if (iVar1 + 1U < 0x20) {
      if (iVar1 == -1) {
        (**(code **)(*engine + 0x9c))(engine,iVar2,"cd pause\n");
      }
      else {
        (**(code **)(*engine + 0x9c))(engine,iVar2,"cd play %3d\n",iVar1);
      }
    }
    else {
      Warning("TriggerCDAudio - Track %d out of range\n",iVar1);
    }
  }
  *(undefined4 *)(this + 0xd8) = 0;
  *(undefined4 *)(this + 0xdc) = 0;
  UTIL_Remove((CBaseEntity *)this);
  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)