L L4D2node

CommandNavPlaceReplace

0x0073cb90 · 187 bytes · __cdecl

_Z22CommandNavPlaceReplaceRK8CCommand

Decompiled

undefined (1 param)

/* CommandNavPlaceReplace(CCommand const&) */

void CommandNavPlaceReplace(CCommand *param_1)

{
  int *piVar1;
  int iVar2;
  char cVar3;
  int iVar4;
  char *pcVar5;
  int iVar6;
  int *piVar7;
  
  cVar3 = UTIL_IsCommandIssuedByServerAdmin();
  if (cVar3 == '\0') {
    return;
  }
  if (*(int *)param_1 == 3) {
    iVar4 = CNavMesh::PartialNameToPlace(TheNavMesh,*(char **)(param_1 + 0x40c));
    pcVar5 = "";
    if (2 < *(int *)param_1) {
      pcVar5 = *(char **)(param_1 + 0x410);
    }
    iVar6 = CNavMesh::PartialNameToPlace(TheNavMesh,pcVar5);
    if ((iVar6 != 0) && (iVar4 != 0)) {
      piVar1 = TheNavAreas + DAT_00fe6000;
      piVar7 = TheNavAreas;
      if (DAT_00fe6000 < 1) {
        return;
      }
      do {
        while (iVar2 = *piVar7, iVar4 != *(int *)(iVar2 + 0x94)) {
          piVar7 = piVar7 + 1;
          if (piVar7 == piVar1) {
            return;
          }
        }
        piVar7 = piVar7 + 1;
        *(int *)(iVar2 + 0x94) = iVar6;
      } while (piVar7 != piVar1);
      return;
    }
  }
  Msg();
  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)