L L4D2node

CFuncNavBlocker::CalculateBlocked

0x00717a10 · 264 bytes · __cdecl

_ZN15CFuncNavBlocker16CalculateBlockedEPbRK6VectorS3_

Decompiled

undefined (3 params)

/* CFuncNavBlocker::CalculateBlocked(bool*, Vector const&, Vector const&) */

uint CFuncNavBlocker::CalculateBlocked(bool *param_1,Vector *param_2,Vector *param_3)

{
  int iVar1;
  uint uVar2;
  char cVar3;
  uint uVar4;
  int iVar5;
  uint local_28;
  int local_20;
  
  *param_1 = false;
  param_1[1] = false;
  uVar4 = (uint)DAT_00fe677c;
  if (uVar4 == 0xffff) {
    local_28 = 0;
  }
  else {
    local_28 = 0;
    local_20 = 0;
    do {
      iVar1 = *(int *)(gm_NavBlockers + uVar4 * 8);
      iVar5 = 0;
      cVar3 = '\0';
      do {
        if ((*(char *)(iVar1 + 0x458 + iVar5) != '\0') && (param_1[iVar5] == false)) {
          if (cVar3 == '\0') {
            cVar3 = IsBoxIntersectingBox
                              ((Vector *)(iVar1 + 0x440),(Vector *)(iVar1 + 0x44c),param_2,param_3);
            if (cVar3 == '\0') goto LAB_00717a70;
          }
          if (*(char *)(iVar1 + 0x460) == '\0') {
            uVar2 = 1;
            if (1 < local_28) {
              uVar2 = local_28;
            }
          }
          else {
            local_28 = 2;
            uVar2 = local_28;
          }
          local_28 = uVar2;
          local_20 = local_20 + 1;
          param_1[iVar5] = true;
          cVar3 = '\x01';
        }
LAB_00717a70:
        iVar5 = iVar5 + 1;
      } while (iVar5 != 2);
    } while ((local_20 != 2) &&
            (uVar4 = (uint)*(ushort *)(gm_NavBlockers + 6 + uVar4 * 8), uVar4 != 0xffff));
  }
  return local_28;
}

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)