L L4D2node

CNavNode::GetNode

0x00746ff0 · 375 bytes · __cdecl

_ZN8CNavNode7GetNodeERK6Vector

Decompiled

undefined (1 param)

/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
/* CNavNode::GetNode(Vector const&) */

int CNavNode::GetNode(Vector *param_1)

{
  int *piVar1;
  float fVar2;
  uint uVar3;
  float *pfVar4;
  uint uVar5;
  int iVar6;
  uint uVar7;
  
  if (g_pNavNodeHash != (int *)0x0) {
    if ((GetNode(Vector_const&)::lookup == '\0') &&
       (iVar6 = __cxa_guard_acquire(&GetNode(Vector_const&)::lookup), iVar6 != 0)) {
      __cxa_guard_release(&GetNode(Vector_const&)::lookup);
      __cxa_atexit(~CNavNode,&GetNode(Vector_const&)::lookup,&__dso_handle);
    }
    piVar1 = g_pNavNodeHash;
    GetNode(Vector_const&)::lookup = *(float *)param_1;
    DAT_00fe8c84 = *(float *)(param_1 + 4);
    _DAT_00fe8c88 = *(undefined4 *)(param_1 + 8);
    uVar5 = Hash8(&GetNode(Vector_const&)::lookup);
    if (*(char *)((int)piVar1 + 0x16) == '\0') {
      uVar5 = uVar5 % (uint)piVar1[3];
    }
    else {
      uVar5 = uVar5 & piVar1[6];
    }
    piVar1 = (int *)(*piVar1 + uVar5 * 0x14);
    uVar3 = piVar1[3];
    if ((int)uVar3 < 1) {
      uVar7 = 0;
LAB_007470a1:
      if ((uVar3 != uVar7) &&
         ((uVar5 = uVar5 << 0x10 | uVar7, uVar5 != 0xffffffff &&
          (iVar6 = *(int *)(*(int *)((uVar5 >> 0x10) * 0x14 + *g_pNavNodeHash) +
                           (uVar7 & 0xffff) * 4), iVar6 != 0)))) {
        fVar2 = *(float *)(iVar6 + 8);
        while( true ) {
          if (ABS(fVar2 - *(float *)(param_1 + 8)) < 11.25) {
            return iVar6;
          }
          iVar6 = *(int *)(iVar6 + 100);
          if (iVar6 == 0) break;
          fVar2 = *(float *)(iVar6 + 8);
        }
      }
    }
    else {
      uVar7 = 0;
      do {
        pfVar4 = *(float **)(*piVar1 + uVar7 * 4);
        if ((GetNode(Vector_const&)::lookup == *pfVar4) && (DAT_00fe8c84 == pfVar4[1]))
        goto LAB_007470a1;
        uVar7 = uVar7 + 1;
      } while (uVar7 != uVar3);
    }
  }
  return 0;
}

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)