L L4D2node

Music::OnBossDefeated

0x008f3990 · 653 bytes · __thiscall

_ZN5Music14OnBossDefeatedE15ZombieClassType

Decompiled

undefined (2 params)

/* Music::OnBossDefeated(ZombieClassType) */

void __thiscall Music::OnBossDefeated(Music *this,int param_2)

{
  undefined4 uVar1;
  
  if (param_2 == 8) {
    if (*(int *)(TheDirector + 0x1c0) < 1) {
      uVar1 = (**(code **)(**(int **)(this + 0x378) + 0xb8))(*(int **)(this + 0x378));
      MusicMsg("%s Music::OnBossDefeated : TANK\n",uVar1);
      this[0x1b0] = (Music)0x0;
      this[0x2f4] = (Music)0x0;
      StopPlaying(this,"tank",2.0,true);
      StopPlaying(this,"tank2",2.0,true);
    }
  }
  else if (param_2 == 2) {
    uVar1 = (**(code **)(**(int **)(this + 0x378) + 0xb8))(*(int **)(this + 0x378));
    MusicMsg("%s Music::OnBossDefeated : BOOMER\n",uVar1);
    StopPlaying(this,"Event.BoomerAlert",0.0,true);
  }
  else if (param_2 == 3) {
    uVar1 = (**(code **)(**(int **)(this + 0x378) + 0xb8))(*(int **)(this + 0x378));
    MusicMsg("%s Music::OnBossDefeated : HUNTER\n",uVar1);
    StopPlaying(this,"Event.HunterAlert",0.0,true);
  }
  else if (param_2 == 1) {
    uVar1 = (**(code **)(**(int **)(this + 0x378) + 0xb8))(*(int **)(this + 0x378));
    MusicMsg("%s Music::OnBossDefeated : SMOKER\n",uVar1);
    StopPlaying(this,"Event.SmokerAlert",0.0,true);
  }
  else if (param_2 == 5) {
    uVar1 = (**(code **)(**(int **)(this + 0x378) + 0xb8))(*(int **)(this + 0x378));
    MusicMsg("%s Music::OnBossDefeated : JOCKEY\n",uVar1);
    StopPlaying(this,"Event.JockeyAlert",0.0,true);
  }
  else if (param_2 == 4) {
    uVar1 = (**(code **)(**(int **)(this + 0x378) + 0xb8))(*(int **)(this + 0x378));
    MusicMsg("%s Music::OnBossDefeated : SPITTER\n",uVar1);
    StopPlaying(this,"Event.SpitterAlert",0.0,true);
  }
  else if (param_2 == 6) {
    uVar1 = (**(code **)(**(int **)(this + 0x378) + 0xb8))(*(int **)(this + 0x378));
    MusicMsg("%s Music::OnBossDefeated : CHARGER\n",uVar1);
    StopPlaying(this,"Event.ChargerAlert",0.0,true);
    (**(code **)(*(int *)this + 0xf0))(this);
                    /* WARNING: Could not recover jumptable at 0x008f3ac4. Too many branches */
                    /* WARNING: Treating indirect jump as call */
    (**(code **)(*(int *)this + 0xf8))();
    return;
  }
  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)