L L4D2node

Music::OnLeaveMissionStartArea

0x008f33b0 · 646 bytes · __thiscall

_ZN5Music23OnLeaveMissionStartAreaEv

Decompiled

undefined (1 param)

/* Music::OnLeaveMissionStartArea() */

void __thiscall Music::OnLeaveMissionStartArea(Music *this)

{
  int iVar1;
  int in_GS_OFFSET;
  longdouble lVar2;
  float fVar3;
  char *this_00;
  Music *pMVar4;
  Music *pMVar5;
  char local_90 [128];
  int local_10;
  
  local_10 = *(int *)(in_GS_OFFSET + 0x14);
  iVar1 = (**(code **)(**(int **)(this + 0x378) + 0xb8))(*(int **)(this + 0x378));
  this_00 = "%s Music::OnLeaveMissionStartArea\n";
  MusicMsg("%s Music::OnLeaveMissionStartArea\n");
  if (*(int *)(MusicManagerOn._28_4_ + 0x30) != 0) {
    SetCheckPoint((Music *)this_00,iVar1);
  }
  StopPlaying(this,"checkpoint_0",3.0,false);
  (**(code **)(*(int *)this + 0x18))(this,"Event.LeavingSafety",local_90);
  Play(this,local_90,0,-1.0,false,false);
  (**(code **)(*(int *)this + 0x18))(this,"Event.StartAtmosphere",local_90);
  Play(this,local_90,0,-1.0,false,false);
  fVar3 = *(float *)(MusicCalmMinInterval._28_4_ + 0x2c) + 10.0;
  lVar2 = (longdouble)CountdownTimer::Now();
  if ((float)lVar2 + fVar3 != *(float *)(this + 0x208)) {
    (**(code **)(*(int *)(this + 0x200) + 4))(this + 0x200,this + 0x208);
    *(float *)(this + 0x208) = (float)lVar2 + fVar3;
  }
  if (fVar3 != *(float *)(this + 0x204)) {
    (**(code **)(*(int *)(this + 0x200) + 4))(this + 0x200,this + 0x204);
    *(float *)(this + 0x204) = fVar3;
  }
  pMVar5 = this + 0x1f0;
  fVar3 = *(float *)(MusicCalmMinInterval._28_4_ + 0x2c);
  pMVar4 = pMVar5;
  lVar2 = (longdouble)CountdownTimer::Now();
  if ((float)lVar2 + fVar3 != *(float *)(this + 0x1f8)) {
    pMVar4 = pMVar5;
    (**(code **)(*(int *)(this + 0x1f0) + 4))(pMVar5,this + 0x1f8);
    *(float *)(this + 0x1f8) = (float)lVar2 + fVar3;
  }
  if (fVar3 != *(float *)(this + 500)) {
    (**(code **)(*(int *)(this + 0x1f0) + 4))(pMVar5,this + 500);
    *(float *)(this + 500) = fVar3;
    pMVar4 = pMVar5;
  }
  if (local_10 == *(int *)(in_GS_OFFSET + 0x14)) {
    return;
  }
                    /* WARNING: Subroutine does not return */
  __stack_chk_fail(pMVar4);
}

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)