L L4D2node

CNavMesh::GetObstructingEntities

0x00741260 · 279 bytes · __thiscall

_ZN8CNavMesh22GetObstructingEntitiesEP9HSCRIPT__

Decompiled

undefined (2 params)

/* CNavMesh::GetObstructingEntities(HSCRIPT__*) */

void __thiscall CNavMesh::GetObstructingEntities(CNavMesh *this,HSCRIPT__ *param_1)

{
  int *piVar1;
  code *pcVar2;
  int iVar3;
  CBaseEntity *this_00;
  int iVar4;
  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;
  
  iVar3 = TheNavMesh;
  local_20 = *(int *)(in_GS_OFFSET + 0x14);
  if ((param_1 != (HSCRIPT__ *)0x0) && (0 < *(int *)(TheNavMesh + 0x5a8))) {
    iVar4 = 0;
    do {
      piVar1 = *(int **)(*(int *)(iVar3 + 0x59c) + iVar4 * 4);
      this_00 = (CBaseEntity *)(**(code **)(*piVar1 + 0xc))(piVar1);
      if (this_00 != (CBaseEntity *)0x0) {
        pcVar2 = *(code **)(*g_pScriptVM + 0x78);
        local_138[0] = (void *)CBaseEntity::GetScriptInstance(this_00);
        local_130 = 0x20;
        local_12e = 0;
                    /* try { // try from 00741308 to 00741334 has its CatchHandler @ 00741372 */
        CFmtStrN<256>::CFmtStrN(local_12c,"obstruction%i",iVar4);
        (*pcVar2)(g_pScriptVM,param_1,local_127,local_138);
        if ((local_12e & 1) != 0) {
          free(local_138[0]);
        }
      }
      iVar4 = iVar4 + 1;
    } while (iVar4 < *(int *)(iVar3 + 0x5a8));
  }
  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)