L L4D2node

Music::OnEnterSurvival

0x008f4d10 · 396 bytes · __thiscall

_ZN5Music15OnEnterSurvivalEv

Decompiled

undefined (1 param)

/* Music::OnEnterSurvival() */

void __thiscall Music::OnEnterSurvival(Music *this)

{
  int iVar1;
  longdouble lVar2;
  float fVar3;
  Music *this_00;
  
  iVar1 = (**(code **)(**(int **)(this + 0x378) + 0xb8))(*(int **)(this + 0x378));
  MusicMsg("%s Music::OnEnterSurvival\n");
  this_00 = this;
  Reset(this);
  if (*(int *)(MusicManagerOn._28_4_ + 0x30) != 0) {
    SetCheckPoint(this_00,iVar1);
  }
  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;
  }
  fVar3 = *(float *)(MusicCalmMinInterval._28_4_ + 0x2c);
  lVar2 = (longdouble)CountdownTimer::Now();
  if ((float)lVar2 + fVar3 != *(float *)(this + 0x1f8)) {
    (**(code **)(*(int *)(this + 0x1f0) + 4))(this + 0x1f0,this + 0x1f8);
    *(float *)(this + 0x1f8) = (float)lVar2 + fVar3;
  }
  if (fVar3 != *(float *)(this + 500)) {
    (**(code **)(*(int *)(this + 0x1f0) + 4))(this + 0x1f0,this + 500);
    *(float *)(this + 500) = fVar3;
  }
  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)