L L4D2node

CDirectorScriptedEventManager::IsMobRushAllowed

0x008b7670 · 135 bytes · __thiscall

_ZNK29CDirectorScriptedEventManager16IsMobRushAllowedEv

Decompiled

undefined (1 param)

/* CDirectorScriptedEventManager::IsMobRushAllowed() const */

uint __thiscall CDirectorScriptedEventManager::IsMobRushAllowed(CDirectorScriptedEventManager *this)

{
  int iVar1;
  CDirectorScriptedEventManager *this_00;
  CDirector *pCVar2;
  undefined8 uVar3;
  
  iVar1 = *(int *)(this + 4);
  this_00 = *(CDirectorScriptedEventManager **)(TheDirector + 0x638);
  pCVar2 = TheDirector;
  if (*(int *)(this_00 + 4) != 9) {
    if (iVar1 == 8) {
      uVar3 = CDirector::GetScriptValue(TheDirector,"ShouldAllowMobsWithTank",0);
      pCVar2 = (CDirector *)((ulonglong)uVar3 >> 0x20);
      this_00 = (CDirectorScriptedEventManager *)uVar3;
      if (this_00 != (CDirectorScriptedEventManager *)0x0) goto LAB_008b76c8;
      this_00 = *(CDirectorScriptedEventManager **)(TheDirector + 0x638);
    }
    if (*(int *)(this_00 + 0x128) == 4) {
      uVar3 = AreAllSurvivorsInBattlefield(this_00);
      pCVar2 = (CDirector *)((ulonglong)uVar3 >> 0x20);
      this_00 = (CDirectorScriptedEventManager *)uVar3;
      if ((char)uVar3 == '\0') goto LAB_008b76c8;
    }
    return 0;
  }
LAB_008b76c8:
  return (CONCAT31((int3)((uint)this_00 >> 8),iVar1 == 10) |
         CONCAT31((int3)((uint)pCVar2 >> 8),iVar1 == 0x13)) ^ 1;
}

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)