L L4D2node

Music::OnSpitterAlert

0x008e9700 · 307 bytes · __thiscall

_ZN5Music14OnSpitterAlertEif

Decompiled

undefined (3 params)

/* Music::OnSpitterAlert(int, float) */

void __thiscall Music::OnSpitterAlert(Music *this,int param_1,float param_2)

{
  float fVar1;
  float fVar2;
  code *pcVar3;
  longdouble lVar4;
  
  fVar1 = *(float *)(this + 0x150);
  pcVar3 = *(code **)(*(int *)this + 0x80);
  lVar4 = (longdouble)CountdownTimer::Now();
  lVar4 = (longdouble)(*pcVar3)(this,param_1,param_2,"Spitter",fVar1 - (float)lVar4);
  fVar1 = (float)lVar4;
  if (0.0 <= fVar1) {
    lVar4 = (longdouble)CountdownTimer::Now();
    if ((float)lVar4 + fVar1 == *(float *)(this + 0x150)) {
      fVar2 = *(float *)(this + 0x14c);
    }
    else {
      (**(code **)(*(int *)(this + 0x148) + 4))(this + 0x148,this + 0x150);
      fVar2 = *(float *)(this + 0x14c);
      *(float *)(this + 0x150) = (float)lVar4 + fVar1;
    }
    if (fVar1 != fVar2) {
      (**(code **)(*(int *)(this + 0x148) + 4))(this + 0x148,this + 0x14c);
      *(float *)(this + 0x14c) = fVar1;
    }
                    /* WARNING: Could not recover jumptable at 0x008e97c3. Too many branches */
                    /* WARNING: Treating indirect jump as call */
    (**(code **)(*(int *)this + 0xcc))();
    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)