L L4D2node

nav_trouble_report_suggestions

0x0098db50 · 941 bytes · __cdecl

_ZL30nav_trouble_report_suggestionsRK8CCommand

Decompiled

undefined (1 param)

/* nav_trouble_report_suggestions(CCommand const&) */

void nav_trouble_report_suggestions(CCommand *param_1)

{
  CNavArea *pCVar1;
  int iVar2;
  undefined4 uVar3;
  int iVar4;
  int iVar5;
  int iVar6;
  char cVar7;
  CUtlVector<CNavArea*,CUtlMemory<CNavArea*,int>> *local_68;
  CNavArea *local_54;
  CNavArea *local_50;
  char *local_4c;
  int local_48;
  char *local_44;
  char *local_40;
  int local_3c;
  char *local_38;
  char local_34 [4];
  int *local_30;
  undefined4 local_2c;
  undefined4 local_28;
  int local_24;
  int *local_20;
  
  local_30 = (int *)0x0;
  local_2c = 0;
  local_28 = 0;
  local_24 = 0;
  local_20 = (int *)0x0;
  local_34[0] = '\x01';
  local_44 = "Large obstruction check";
  local_48 = 0;
  local_4c = local_34;
  if (DAT_00fe6000 < 1) {
LAB_0098dca3:
    Msg("%s passed\n",local_44);
  }
  else {
    iVar4 = 0;
    do {
      pCVar1 = *(CNavArea **)(TheNavAreas + iVar4 * 4);
      if (s_testNavID < 1) {
        cVar7 = IsAreaTestable(pCVar1);
      }
      else {
        cVar7 = s_testNavID == *(int *)(pCVar1 + 0x8c);
      }
      if ((((cVar7 != '\0') && (pCVar1[0x3a] != (CNavArea)0x0)) &&
          (41.8 < (float)(byte)pCVar1[0x3a] + 0.0)) &&
         ((250.0 < *(float *)(pCVar1 + 0x10) - *(float *)(pCVar1 + 4) ||
          (250.0 < *(float *)(pCVar1 + 0x14) - *(float *)(pCVar1 + 8))))) {
        local_54 = pCVar1;
        if ((local_34[0] == '\0') || (local_24 < 1)) {
LAB_0098dc60:
                    /* try { // try from 0098dc71 to 0098dc75 has its CatchHandler @ 0098df5c */
          CUtlVector<CNavArea*,CUtlMemory<CNavArea*,int>>::InsertBefore
                    ((CUtlVector<CNavArea*,CUtlMemory<CNavArea*,int>> *)&local_30,local_24,&local_54
                    );
        }
        else if (pCVar1 != (CNavArea *)*local_30) {
          iVar2 = 0;
          do {
            iVar2 = iVar2 + 1;
            if (iVar2 == local_24) goto LAB_0098dc60;
          } while (pCVar1 != (CNavArea *)local_30[iVar2]);
          if (iVar2 < 0) goto LAB_0098dc60;
        }
      }
      iVar4 = iVar4 + 1;
    } while (iVar4 < DAT_00fe6000);
    if (*(int *)(local_4c + 0x10) <= local_48) goto LAB_0098dca3;
    Warning("%s found %d areas\n",local_44,*(int *)(local_4c + 0x10) - local_48);
  }
  iVar5 = s_testNavID;
  iVar2 = DAT_00fe6000;
  iVar4 = TheNavAreas;
  local_68 = (CUtlVector<CNavArea*,CUtlMemory<CNavArea*,int>> *)&local_30;
  iVar6 = 0;
  local_38 = "Missing population check";
  local_3c = local_24;
  local_40 = local_34;
  if (0 < DAT_00fe6000) {
    do {
      pCVar1 = *(CNavArea **)(iVar4 + iVar6 * 4);
      if (iVar5 < 1) {
        cVar7 = IsAreaTestable(pCVar1);
      }
      else {
        cVar7 = *(int *)(pCVar1 + 0x8c) == iVar5;
      }
      if ((cVar7 != '\0') && (*(int *)(pCVar1 + 0x94) != 0)) {
        iVar2 = 0;
        goto LAB_0098dd66;
      }
      iVar6 = iVar6 + 1;
    } while (iVar6 != iVar2);
  }
  Msg("%s passed\n","Missing population check");
LAB_0098de14:
                    /* try { // try from 0098de1c to 0098deb3 has its CatchHandler @ 0098df38 */
  CNavMesh::ClearSelectedSet(TheNavMesh);
  iVar4 = 0;
  if (0 < local_24) {
    do {
      CNavMesh::AddToSelectedSet(TheNavMesh,(CNavArea *)local_30[iVar4]);
      iVar4 = iVar4 + 1;
    } while (iVar4 < local_24);
  }
  iVar4 = CNavMesh::GetSelecteSetSize(TheNavMesh);
  if (iVar4 == 0) {
    Msg("No trouble areas selected\n");
  }
  else {
    uVar3 = CNavMesh::GetSelecteSetSize(TheNavMesh);
    Warning("Selected %d trouble areas\n",uVar3);
  }
  local_24 = 0;
  CUtlMemory<CNavArea*,int>::Purge((CUtlMemory<CNavArea*,int> *)local_68);
  local_20 = local_30;
  CUtlMemory<CNavArea*,int>::Purge((CUtlMemory<CNavArea*,int> *)local_68);
  return;
LAB_0098dd66:
  pCVar1 = *(CNavArea **)(iVar4 + iVar2 * 4);
  if (iVar5 < 1) {
    cVar7 = IsAreaTestable(pCVar1);
  }
  else {
    cVar7 = *(int *)(pCVar1 + 0x8c) == iVar5;
  }
  if ((cVar7 == '\0') || (*(int *)(pCVar1 + 0x94) != 0)) {
LAB_0098dd4f:
    if (DAT_00fe6000 <= iVar2 + 1) goto LAB_0098ddd8;
  }
  else {
    local_50 = pCVar1;
    if ((local_34[0] != '\0') && (0 < local_24)) {
      if (pCVar1 != (CNavArea *)*local_30) {
        iVar4 = 0;
        do {
          iVar4 = iVar4 + 1;
          if (iVar4 == local_24) goto LAB_0098ddb0;
        } while (pCVar1 != (CNavArea *)local_30[iVar4]);
        if (iVar4 < 0) goto LAB_0098ddb0;
      }
      goto LAB_0098dd4f;
    }
LAB_0098ddb0:
                    /* try { // try from 0098ddc1 to 0098ddc5 has its CatchHandler @ 0098df4d */
    CUtlVector<CNavArea*,CUtlMemory<CNavArea*,int>>::InsertBefore(local_68,local_24,&local_50);
    if (DAT_00fe6000 <= iVar2 + 1) goto LAB_0098ddd8;
  }
  iVar2 = iVar2 + 1;
  iVar4 = TheNavAreas;
  iVar5 = s_testNavID;
  goto LAB_0098dd66;
LAB_0098ddd8:
  if (local_3c < *(int *)(local_40 + 0x10)) {
    Warning("%s found %d areas\n",local_38,*(int *)(local_40 + 0x10) - local_3c);
  }
  else {
    Msg("%s passed\n",local_38);
  }
  goto LAB_0098de14;
}

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)