L L4D2node

CNavMesh::GetAreasWithAttributes

0x00741390 · 267 bytes · __thiscall

_ZN8CNavMesh22GetAreasWithAttributesEiP9HSCRIPT__

Decompiled

undefined (3 params)

/* CNavMesh::GetAreasWithAttributes(int, HSCRIPT__*) */

void __thiscall CNavMesh::GetAreasWithAttributes(CNavMesh *this,int param_1,HSCRIPT__ *param_2)

{
  TerrorNavArea *this_00;
  code *pcVar1;
  int iVar2;
  int in_GS_OFFSET;
  void *local_138 [2];
  undefined2 local_130;
  ushort local_12e;
  CFmtStrN<256> local_12c [5];
  undefined1 local_127 [263];
  int local_20;
  
  iVar2 = 0;
  local_20 = *(int *)(in_GS_OFFSET + 0x14);
  if (0 < DAT_00fe6000) {
    do {
      this_00 = *(TerrorNavArea **)(TheNavAreas + iVar2 * 4);
      if ((this_00 != (TerrorNavArea *)0x0) && ((param_1 & *(uint *)(this_00 + 0x54)) != 0)) {
        pcVar1 = *(code **)(*g_pScriptVM + 0x78);
        local_138[0] = (void *)TerrorNavArea::GetScriptInstance(this_00);
        local_130 = 0x20;
        local_12e = 0;
                    /* try { // try from 00741425 to 00741451 has its CatchHandler @ 00741496 */
        CFmtStrN<256>::CFmtStrN(local_12c,"area%i",iVar2);
        (*pcVar1)(g_pScriptVM,param_2,local_127,local_138);
        if ((local_12e & 1) != 0) {
          free(local_138[0]);
        }
      }
      iVar2 = iVar2 + 1;
    } while (iVar2 < DAT_00fe6000);
  }
  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {
    return;
  }
                    /* WARNING: Subroutine does not return */
  __stack_chk_fail();
}

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)