L L4D2node

CDirector::AreWanderersAllowed

0x0087a680 · 178 bytes · __thiscall

_ZNK9CDirector19AreWanderersAllowedEv

Decompiled

undefined (1 param)

/* CDirector::AreWanderersAllowed() const */

uint __thiscall CDirector::AreWanderersAllowed(CDirector *this)

{
  char cVar1;
  int iVar2;
  undefined3 extraout_var;
  longdouble lVar3;
  CDirector *this_00;
  bool local_11;
  float local_10 [2];
  
  cVar1 = CDirectorScavengeMode::AreWanderersAllowed
                    (*(CDirectorScavengeMode **)(this + 0x644),&local_11);
  if (cVar1 != '\0') {
    return (uint)local_11;
  }
  this_00 = this;
  iVar2 = GetScriptValue(this,"AlwaysAllowWanderers",
                         (uint)(*(int *)(director_always_allow_wanderers._28_4_ + 0x30) != 0));
  if (iVar2 == 0) {
    if ((0 < *(int *)(this + 0x1c0)) && (cVar1 = IsAnySurvivorBypassingTank(this_00), cVar1 != '\0')
       ) {
      return 1;
    }
    if (*(int *)(this + 0x194) - 2U < 2) {
      lVar3 = (longdouble)GetIntensityRelaxAllowWanderersThreshold(this);
      local_10[0] = 0.0;
      ForEachTerrorPlayer<FindMaxIntensity>((FindMaxIntensity *)local_10);
      return CONCAT31(extraout_var,local_10[0] < (float)lVar3);
    }
  }
  return 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)