L L4D2node

nav_update_lighting

0x006f8f20 · 170 bytes · __cdecl

_ZL19nav_update_lightingRK8CCommand

Decompiled

undefined (1 param)

/* nav_update_lighting(CCommand const&) */

void nav_update_lighting(CCommand *param_1)

{
  char cVar1;
  int *piVar2;
  int iVar3;
  uint uVar4;
  
  if (*(int *)param_1 == 2) {
    uVar4 = strtol(*(char **)(param_1 + 0x40c),(char **)0x0,10);
    piVar2 = (int *)CNavMesh::GetNavAreaByID(TheNavMesh,uVar4);
    if (piVar2 == (int *)0x0) {
      uVar4 = 0;
    }
    else {
      uVar4 = (**(code **)(*piVar2 + 0x70))(piVar2);
      uVar4 = uVar4 & 0xff;
    }
  }
  else {
    iVar3 = 0;
    uVar4 = 0;
    if (0 < DAT_00fe6000) {
      uVar4 = 0;
      do {
        piVar2 = *(int **)(TheNavAreas + iVar3 * 4);
        cVar1 = (**(code **)(*piVar2 + 0x70))(piVar2);
        uVar4 = (uVar4 + 1) - (uint)(cVar1 == '\0');
        iVar3 = iVar3 + 1;
      } while (iVar3 < DAT_00fe6000);
    }
  }
  DevMsg("Computed lighting for %d/%d areas\n",uVar4,DAT_00fe6000);
  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)