L L4D2node

CommandNavUpdateBlocked

0x00704580 · 752 bytes · unknown

_ZL23CommandNavUpdateBlockedv

Decompiled

undefined (0 params)

/* WARNING: Unknown calling convention -- yet parameter storage is locked */
/* CommandNavUpdateBlocked() */

void CommandNavUpdateBlocked(void)

{
  int *piVar1;
  char cVar2;
  int iVar3;
  int *piVar4;
  CBasePlayer *this;
  int in_GS_OFFSET;
  longdouble lVar5;
  longdouble lVar6;
  double dVar7;
  int local_138;
  int local_134;
  float local_130;
  CFmtStrN<256> local_12c [5];
  undefined1 local_127 [263];
  int local_20;
  
  local_20 = *(int *)(in_GS_OFFSET + 0x14);
  cVar2 = UTIL_IsCommandIssuedByServerAdmin();
  if (cVar2 != '\0') {
    iVar3 = CNavMesh::GetMarkedArea(TheNavMesh);
    if (iVar3 == 0) {
      lVar5 = (longdouble)Plat_FloatTime();
      if (DAT_00fe6000 < 1) {
        lVar6 = (longdouble)Plat_FloatTime();
        dVar7 = (double)(((float)lVar6 - (float)lVar5) * 1000.0);
        DevMsg("nav_update_blocked took %2.2f ms\n",SUB84(dVar7,0),(int)((ulonglong)dVar7 >> 0x20));
      }
      else {
        iVar3 = 0;
        piVar4 = (int *)0x0;
        do {
          piVar1 = *(int **)(TheNavAreas + iVar3 * 4);
          (**(code **)(*piVar1 + 0x48))(piVar1,1,0xffffffff);
          if (*(char *)((int)piVar1 + 0x7f) != '\0') {
            CFmtStrN<256>::CFmtStrN
                      (local_12c,"(%f, %f, %f)",SUB84((double)(float)piVar1[0xb],0),
                       (int)((ulonglong)(double)(float)piVar1[0xb] >> 0x20),
                       (double)(float)piVar1[0xc],(double)((float)piVar1[0xd] + 35.5));
            DevMsg("Area #%d %s is blocked\n",piVar1[0x23],local_127);
            if (piVar4 == (int *)0x0) {
              piVar4 = piVar1;
            }
          }
          iVar3 = iVar3 + 1;
        } while (iVar3 < DAT_00fe6000);
        lVar6 = (longdouble)Plat_FloatTime();
        dVar7 = (double)(((float)lVar6 - (float)lVar5) * 1000.0);
        DevMsg("nav_update_blocked took %2.2f ms\n",SUB84(dVar7,0),(int)((ulonglong)dVar7 >> 0x20));
        if ((((piVar4 != (int *)0x0) &&
             (this = (CBasePlayer *)UTIL_GetListenServerHost(), this != (CBasePlayer *)0x0)) &&
            ((cVar2 = CBasePlayer::IsDead(this), cVar2 != '\0' || (((byte)this[0x1d20] & 8) != 0))))
           && (iVar3 = (**(code **)(*(int *)this + 0x648))(this), iVar3 == 6)) {
          local_138 = piVar4[0xb];
          local_134 = piVar4[0xc];
          local_130 = (float)piVar4[0xd] + 53.25;
          UTIL_SetOrigin((CBaseEntity *)this,(Vector *)&local_138,false);
        }
      }
    }
    else {
      piVar4 = (int *)CNavMesh::GetMarkedArea(TheNavMesh);
      (**(code **)(*piVar4 + 0x48))(piVar4,1,0xffffffff);
      if (*(char *)((int)piVar4 + 0x7f) != '\0') {
        CFmtStrN<256>::CFmtStrN
                  (local_12c,"(%f, %f, %f)",SUB84((double)(float)piVar4[0xb],0),
                   (int)((ulonglong)(double)(float)piVar4[0xb] >> 0x20),(double)(float)piVar4[0xc],
                   (double)((float)piVar4[0xd] + 35.5));
        DevMsg("Area #%d %s is blocked\n",piVar4[0x23],local_127);
      }
    }
  }
  if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {
                    /* WARNING: Subroutine does not return */
    __stack_chk_fail();
  }
  return;
}

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)