L L4D2node

TerrorNavArea::MarkAreaCleared

0x00978dc0 · 360 bytes · __thiscall

_ZN13TerrorNavArea15MarkAreaClearedEP13CTerrorPlayer

Decompiled

undefined (2 params)

/* TerrorNavArea::MarkAreaCleared(CTerrorPlayer*) */

void __thiscall TerrorNavArea::MarkAreaCleared(TerrorNavArea *this,CTerrorPlayer *param_1)

{
  char cVar1;
  int iVar2;
  longdouble lVar3;
  float local_20;
  
  iVar2 = CDirector::GetScriptValue
                    (TheDirector,"ZombieDontClear",
                     *(int *)(DirectorPrivate_DirectorZombieDontClear._28_4_ + 0x30));
  if (iVar2 != 0) {
    return;
  }
  cVar1 = IsCleared(this,(CTerrorPlayer *)0x0);
  if (param_1 == (CTerrorPlayer *)0x0) {
    this[0x145] = (TerrorNavArea)0xf;
    lVar3 = (longdouble)IntervalTimer::Now();
    local_20 = (float)lVar3;
    if (local_20 != *(float *)(this + 0x14c)) {
      iVar2 = *(int *)(this + 0x148);
LAB_00978f12:
      (**(code **)(iVar2 + 4))(this + 0x148,this + 0x14c);
      *(float *)(this + 0x14c) = local_20;
    }
  }
  else {
    iVar2 = CBaseEntity::GetTeamNumber((CBaseEntity *)param_1);
    if ((iVar2 != 2) || (3 < *(uint *)(param_1 + 0x2ba0))) goto LAB_00978e27;
    this[0x145] = (TerrorNavArea)
                  ((byte)this[0x145] | (byte)(1 << ((byte)*(uint *)(param_1 + 0x2ba0) & 0x1f)));
    lVar3 = (longdouble)IntervalTimer::Now();
    local_20 = (float)lVar3;
    if (local_20 != *(float *)(this + 0x14c)) {
      iVar2 = *(int *)(this + 0x148);
      goto LAB_00978f12;
    }
  }
  *(undefined4 *)(this + 0x128) = 0;
LAB_00978e27:
  if (*(float *)(this + 0x16c) != -1.0) {
    (**(code **)(*(int *)(this + 0x168) + 4))(this + 0x168,this + 0x16c);
    *(undefined4 *)(this + 0x16c) = 0xbf800000;
  }
  if (cVar1 == '\0') {
    return;
  }
  TerrorNavMesh::OnAreaCleared(TheNavMesh,this);
  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)