L L4D2node

TerrorNavMesh::OnEditDestroyNotify

0x00978190 · 323 bytes · __thiscall

_ZN13TerrorNavMesh19OnEditDestroyNotifyEP8CNavArea

Decompiled

undefined (2 params)

/* TerrorNavMesh::OnEditDestroyNotify(CNavArea*) */

void __thiscall TerrorNavMesh::OnEditDestroyNotify(TerrorNavMesh *this,CNavArea *param_1)

{
  int iVar1;
  int *piVar2;
  CNavArea *pCVar3;
  int iVar4;
  CEscapeRoute *this_00;
  int iVar5;
  CNavArea *local_20 [4];
  
  iVar1 = *(int *)(this + 0x628);
  if (0 < iVar1) {
    piVar2 = *(int **)(this + 0x61c);
    iVar4 = 0;
    if (param_1 != (CNavArea *)*piVar2) {
      do {
        iVar4 = iVar4 + 1;
        if (iVar4 == iVar1) goto LAB_009781d2;
      } while (param_1 != (CNavArea *)piVar2[iVar4]);
      if (iVar4 == -1) goto LAB_009781d2;
    }
    iVar5 = (iVar1 - iVar4) + -1;
    if (iVar5 < 1) {
      *(int *)(this + 0x628) = iVar1 + -1;
    }
    else {
      _V_memmove(piVar2 + iVar4,piVar2 + iVar4 + 1,iVar5 * 4);
      *(int *)(this + 0x628) = *(int *)(this + 0x628) + -1;
    }
  }
LAB_009781d2:
  local_20[0] = param_1;
  CUtlVector<TerrorNavArea*,CUtlMemory<TerrorNavArea*,int>>::FindAndFastRemove
            ((CUtlVector<TerrorNavArea*,CUtlMemory<TerrorNavArea*,int>> *)(this + 0x634),
             (TerrorNavArea **)local_20);
  local_20[0] = param_1;
  ForEachSurvivor<DeadAreaNotify>((DeadAreaNotify *)local_20);
  this_00 = (CEscapeRoute *)
            CGlobalEntityList::FindEntityByClassname
                      ((CGlobalEntityList *)gEntList,(CBaseEntity *)0x0,"escape_route");
  if (this_00 != (CEscapeRoute *)0x0) {
    CEscapeRoute::OnEditDestroyNotify(this_00,param_1);
  }
  if (*(CNavArea **)(this + 0x600) == param_1) {
    *(undefined4 *)(this + 0x600) = 0;
    pCVar3 = *(CNavArea **)(this + 0x604);
  }
  else {
    pCVar3 = *(CNavArea **)(this + 0x604);
  }
  if (pCVar3 == param_1) {
    *(undefined4 *)(this + 0x604) = 0;
  }
  if (*(CNavArea **)(this + 0x608) != param_1) {
    return;
  }
  *(undefined4 *)(this + 0x608) = 0;
  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)