L L4D2node

CDirectorScriptedEventManager::OnMapInvokedPanicEventNonVirtual

0x008bb100 · 672 bytes · __thiscall

_ZN29CDirectorScriptedEventManager32OnMapInvokedPanicEventNonVirtualEP11CBasePlayer20panic_event_reason_t

Decompiled

undefined (3 params)

/* CDirectorScriptedEventManager::OnMapInvokedPanicEventNonVirtual(CBasePlayer*,
   panic_event_reason_t) */

undefined4 __thiscall
CDirectorScriptedEventManager::OnMapInvokedPanicEventNonVirtual
          (CDirectorScriptedEventManager *this,CBasePlayer *param_1,int param_3)

{
  int *piVar1;
  int *piVar2;
  undefined4 uVar3;
  longdouble lVar4;
  
  piVar1 = TheDirector;
  if (param_3 == 3) {
    *(undefined4 *)this = 3;
    *(undefined4 *)(TheZombieManager + 0x210) = 0;
    UTIL_LogPrintf("%3.2f: ZombieManager::ClearPendingMobCount: All mobs cleared.\n",
                   (double)*(float *)(gpGlobals + 0xc));
    ChangeFinaleStage(this,10,0);
    lVar4 = (longdouble)CountdownTimer::Now();
    if ((float)lVar4 + 1.0 != *(float *)(this + 0x98)) {
      (**(code **)(*(int *)(this + 0x90) + 4))(this + 0x90,this + 0x98);
      *(float *)(this + 0x98) = (float)lVar4 + 1.0;
    }
    if (*(float *)(this + 0x94) != 1.0) {
      (**(code **)(*(int *)(this + 0x90) + 4))(this + 0x90,this + 0x94);
      *(undefined4 *)(this + 0x94) = 0x3f800000;
    }
    if (*(float *)(this + 0xc0) != -1.0) {
      (**(code **)(*(int *)(this + 0xbc) + 4))(this + 0xbc,this + 0xc0);
      *(undefined4 *)(this + 0xc0) = 0xbf800000;
    }
    *(undefined4 *)(this + 0xe8) = 0;
    *(undefined4 *)(this + 0xe4) = 0;
    *(undefined4 *)(this + 0xec) = 0;
    if (*(float *)(this + 0xfc) != -1.0) {
      (**(code **)(*(int *)(this + 0xf4) + 4))(this + 0xf4,this + 0xfc);
      *(undefined4 *)(this + 0xfc) = 0xbf800000;
    }
    uVar3 = (**(code **)(*TheDirector + 100))(TheDirector);
    if ((char)uVar3 == '\0') {
      uVar3 = 1;
    }
    else {
      this[0xf0] = (CDirectorScriptedEventManager)0x0;
    }
  }
  else {
    if (((1 < param_3 - 1U) && (0.0 < (float)TheDirector[0x10c])) &&
       (lVar4 = (longdouble)CountdownTimer::Now(), (float)lVar4 < (float)piVar1[0x10c])) {
      return 0;
    }
    piVar2 = TheDirector;
    piVar1 = TheDirector + 0x10a;
    lVar4 = (longdouble)CountdownTimer::Now();
    if ((float)lVar4 + 90.0 != (float)piVar2[0x10c]) {
      (**(code **)(piVar2[0x10a] + 4))(piVar1,piVar2 + 0x10c);
      piVar2[0x10c] = (int)((float)lVar4 + 90.0);
    }
    if ((float)piVar2[0x10b] != 90.0) {
      (**(code **)(piVar2[0x10a] + 4))(piVar1,piVar2 + 0x10b);
      piVar2[0x10b] = 0x42b40000;
    }
    StartPanicEvent(this,0,param_1);
    uVar3 = 1;
  }
  return uVar3;
}

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)