L L4D2node

Music::OnLeaveCheckpoint

0x008f36d0 · 675 bytes · __thiscall

_ZN5Music17OnLeaveCheckpointEv

Decompiled

undefined (1 param)

/* Music::OnLeaveCheckpoint() */

void __thiscall Music::OnLeaveCheckpoint(Music *this)

{
  char cVar1;
  int iVar2;
  int in_GS_OFFSET;
  longdouble lVar3;
  float fVar4;
  char *this_00;
  Music *pMVar5;
  Music *pMVar6;
  char local_90 [128];
  int local_10;
  
  local_10 = *(int *)(in_GS_OFFSET + 0x14);
  iVar2 = (**(code **)(**(int **)(this + 0x378) + 0xb8))(*(int **)(this + 0x378));
  this_00 = "%s Music::OnLeaveCheckpoint\n";
  MusicMsg("%s Music::OnLeaveCheckpoint\n");
  if (*(int *)(MusicManagerOn._28_4_ + 0x30) != 0) {
    SetCheckPoint((Music *)this_00,iVar2);
  }
  pMVar5 = this;
  StopPlaying(this,"checkpoint_2",3.0,false);
  cVar1 = CTerrorGameRules::IsScavengeMode();
  if (cVar1 == '\0') {
    (**(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);
    fVar4 = *(float *)(MusicCalmMinInterval._28_4_ + 0x2c) + 10.0;
    lVar3 = (longdouble)CountdownTimer::Now();
    if ((float)lVar3 + fVar4 != *(float *)(this + 0x208)) {
      (**(code **)(*(int *)(this + 0x200) + 4))(this + 0x200,this + 0x208);
      *(float *)(this + 0x208) = (float)lVar3 + fVar4;
    }
    if (fVar4 != *(float *)(this + 0x204)) {
      (**(code **)(*(int *)(this + 0x200) + 4))(this + 0x200,this + 0x204);
      *(float *)(this + 0x204) = fVar4;
    }
    pMVar6 = this + 0x1f0;
    fVar4 = *(float *)(MusicCalmMinInterval._28_4_ + 0x2c);
    pMVar5 = pMVar6;
    lVar3 = (longdouble)CountdownTimer::Now();
    if ((float)lVar3 + fVar4 != *(float *)(this + 0x1f8)) {
      pMVar5 = pMVar6;
      (**(code **)(*(int *)(this + 0x1f0) + 4))(pMVar6,this + 0x1f8);
      *(float *)(this + 0x1f8) = (float)lVar3 + fVar4;
    }
    if (fVar4 != *(float *)(this + 500)) {
      (**(code **)(*(int *)(this + 0x1f0) + 4))(pMVar6,this + 500);
      *(float *)(this + 500) = fVar4;
      pMVar5 = pMVar6;
    }
  }
  if (local_10 == *(int *)(in_GS_OFFSET + 0x14)) {
    return;
  }
                    /* WARNING: Subroutine does not return */
  __stack_chk_fail(pMVar5);
}

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)