L L4D2node

Music::PrecacheMusicEvent

0x008ec250 · 194 bytes · __cdecl

_ZN5Music18PrecacheMusicEventEPKc

Decompiled

undefined (1 param)

/* Music::PrecacheMusicEvent(char const*) */

void Music::PrecacheMusicEvent(char *param_1)

{
  char cVar1;
  ushort uVar2;
  undefined4 uVar3;
  undefined4 *puVar4;
  undefined4 *puVar5;
  uint uVar6;
  int iVar7;
  char local_20 [16];
  
  AllocPooledString(local_20);
  CBaseEntity::PrecacheScriptSound(param_1);
  uVar3 = (**(code **)(*soundemitterbase + 0x1c))(soundemitterbase,param_1);
  cVar1 = (**(code **)(*soundemitterbase + 0x20))(soundemitterbase,uVar3);
  if (((cVar1 != '\0') &&
      (puVar4 = (undefined4 *)(**(code **)(*soundemitterbase + 0x58))(soundemitterbase,uVar3),
      puVar4 != (undefined4 *)0x0)) && (uVar2 = *(ushort *)(puVar4 + 2), uVar2 != 0)) {
    uVar6 = (uint)uVar2;
    iVar7 = 0;
    while( true ) {
      puVar5 = puVar4;
      if (uVar2 != 1) {
        puVar5 = (undefined4 *)*puVar4;
      }
      (**(code **)(*soundemitterbase + 0x30))(soundemitterbase,puVar5 + iVar7);
      AllocPooledString(local_20);
      if (iVar7 == uVar6 - 1) break;
      uVar2 = *(ushort *)(puVar4 + 2);
      iVar7 = iVar7 + 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)