L L4D2node

NavMeshMergeAutocomplete

0x007364d0 · 364 bytes · __cdecl

_Z24NavMeshMergeAutocompletePKcPA64_c

Decompiled

undefined (2 params)

/* NavMeshMergeAutocomplete(char const*, char (*) [64]) */

int NavMeshMergeAutocomplete(char *param_1,char *param_2)

{
  int iVar1;
  int iVar2;
  char *pcVar3;
  int iVar4;
  int in_GS_OFFSET;
  int local_130;
  undefined4 local_128;
  char local_124 [260];
  int local_20;
  
  local_20 = *(int *)(in_GS_OFFSET + 0x14);
  iVar1 = _V_strlen("nav_merge_mesh");
  iVar2 = _V_strlen(param_1 + iVar1 + 1);
  pcVar3 = (char *)(**(code **)(*filesystem + 0x80))
                             (filesystem,"maps/*_selected_*.txt",&DAT_00c146f4,&local_128);
  local_130 = 0;
  if (pcVar3 != (char *)0x0) {
    do {
      V_FileBase(pcVar3,local_124,0x104);
      iVar4 = V_strnicmp(local_124,param_1 + iVar1 + 1,iVar2);
      if (iVar4 == 0) {
        iVar4 = V_stristr(local_124,"_selected_");
        if (iVar4 != 0) {
          iVar4 = local_130 + 1;
          V_snprintf(param_2 + local_130 * 0x40,0x40,"%s %s","nav_merge_mesh",local_124);
          local_130 = iVar4;
          if (iVar4 == 0x40) {
            local_130 = 0x40;
            goto LAB_00736627;
          }
        }
      }
      pcVar3 = (char *)(**(code **)(*filesystem + 0x74))(filesystem,local_128);
    } while (pcVar3 != (char *)0x0);
  }
  (**(code **)(*filesystem + 0x7c))(filesystem,local_128);
LAB_00736627:
  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {
    return local_130;
  }
                    /* 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)