L L4D2node

CBaseDoor::BlockNavArea

0x00667430 · 307 bytes · __thiscall

_ZN9CBaseDoor12BlockNavAreaEb

Decompiled

undefined (2 params)

/* CBaseDoor::BlockNavArea(bool) */

void __thiscall CBaseDoor::BlockNavArea(CBaseDoor *this,bool param_1)

{
  CNavArea *this_00;
  int *piVar1;
  int iVar2;
  
  piVar1 = gameeventmanager;
  if (param_1) {
    if ((*(uint *)(this + 0x148) & 0x60000) != 0) {
      iVar2 = 2;
      this[0x4c0] = (CBaseDoor)0x1;
      (**(code **)(*piVar1 + 0x10))(piVar1,this + 0x4b8,"round_start_post_nav",1);
      if ((*(uint *)(this + 0x148) & 0x20000) != 0) {
        iVar2 = (-(uint)((*(uint *)(this + 0x148) & 0x40000) == 0) & 4) - 1;
      }
      if (((byte)this[0x14d] & 8) != 0) {
        CBaseEntity::CalcAbsolutePosition((CBaseEntity *)this);
      }
      this_00 = (CNavArea *)CNavMesh::GetNavArea(TheNavMesh,(Vector *)(this + 0x2e0),120.0);
      if (this_00 != (CNavArea *)0x0) {
        CNavArea::MarkAsBlocked(this_00,iVar2,(CBaseEntity *)this,true);
        *(undefined4 *)(this + 0x5fc) = *(undefined4 *)(this_00 + 0x8c);
      }
    }
  }
  else if (0 < (int)*(uint *)(this + 0x5fc)) {
    piVar1 = (int *)CNavMesh::GetNavAreaByID(TheNavMesh,*(uint *)(this + 0x5fc));
    if (piVar1 != (int *)0x0) {
      (**(code **)(*piVar1 + 0x48))(piVar1,1,0xffffffff);
    }
    *(undefined4 *)(this + 0x5fc) = 0;
    return;
  }
  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)