L L4D2node

CDirector::GetMobSpawnMinInterval

0x00879110 · 136 bytes · __thiscall

_ZNK9CDirector22GetMobSpawnMinIntervalEv

Decompiled

undefined (1 param)

/* CDirector::GetMobSpawnMinInterval() const */

longdouble __thiscall CDirector::GetMobSpawnMinInterval(CDirector *this)

{
  int iVar1;
  longdouble lVar2;
  float fVar3;
  
  lVar2 = (longdouble)GetScriptValue(this,"MobSpawnMinTime",-1.0);
  fVar3 = (float)lVar2;
  if (fVar3 == -1.0) {
    iVar1 = GetDifficulty();
    if (iVar1 == 2) {
      fVar3 = *(float *)(DirectorPrivate_ZombieMobSpawnMinTimeHard._28_4_ + 0x2c);
    }
    else if (iVar1 == 3) {
      fVar3 = *(float *)(DirectorPrivate_ZombieMobSpawnMinTimeExpert._28_4_ + 0x2c);
    }
    else {
      if (iVar1 != 1) {
        return (longdouble)*(float *)(DirectorPrivate_ZombieMobSpawnMinTimeEasy._28_4_ + 0x2c);
      }
      fVar3 = *(float *)(DirectorPrivate_ZombieMobSpawnMinTimeNormal._28_4_ + 0x2c);
    }
  }
  return (longdouble)fVar3;
}

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)