L L4D2node

Music::OnScavengeLevelChange

0x008f4720 · 186 bytes · __thiscall

_ZN5Music21OnScavengeLevelChangeEi

Decompiled

undefined (2 params)

/* Music::OnScavengeLevelChange(int) */

void __thiscall Music::OnScavengeLevelChange(Music *this,int param_1)

{
  char *pcVar1;
  undefined4 uVar2;
  int iVar3;
  int iVar4;
  
  uVar2 = (**(code **)(**(int **)(this + 0x378) + 0xb8))(*(int **)(this + 0x378));
  iVar4 = param_1;
  MusicMsg("%s Music::OnScavengeLevelChange  : %i\n",uVar2,param_1);
  if (*(int *)(MusicDynamicUseScavengeBeat._28_4_ + 0x30) != 0) {
    if (param_1 < 1) {
      iVar4 = 0x3f800000;
      StopPlaying(this,"all",1.0,false);
    }
    iVar3 = 10;
    if (param_1 < 0xb) {
      iVar3 = param_1;
    }
    pcVar1 = (&PTR_PlayInOut_00cfcf5c)[iVar3];
    MusicMsg("Music::OnScavengeLevelChange  : %s\n",pcVar1,iVar4);
    Play(this,pcVar1,0,-1.0,false,false);
  }
  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)