L L4D2node

TerrorNavMesh::AddWalkableSeeds

0x00977510 · 545 bytes · __thiscall

_ZN13TerrorNavMesh16AddWalkableSeedsEv

Decompiled

undefined (1 param)

/* TerrorNavMesh::AddWalkableSeeds() */

void __thiscall TerrorNavMesh::AddWalkableSeeds(TerrorNavMesh *this)

{
  char cVar1;
  undefined1 *puVar2;
  longdouble lVar3;
  double dVar4;
  double dVar5;
  CBaseEntity *this_00;
  Vector *local_4c;
  char *local_48;
  char *local_38;
  float local_34;
  float local_30;
  undefined4 local_2c;
  Vector local_28 [24];
  
  local_38 = "info_landmark";
  ZombieDebugPrint(1,"Flow: Walkable seeds...\n");
  local_48 = "weapon_ammo_spawn";
  local_4c = (Vector *)&local_38;
  do {
    this_00 = (CBaseEntity *)0x0;
    while( true ) {
      this_00 = (CBaseEntity *)
                CGlobalEntityList::FindEntityByClassname
                          ((CGlobalEntityList *)gEntList,this_00,local_48);
      if (this_00 == (CBaseEntity *)0x0) break;
      if (((byte)this_00[0x14d] & 8) != 0) {
        CBaseEntity::CalcAbsolutePosition(this_00);
      }
      local_34 = *(float *)(this_00 + 0x2e0);
      local_30 = *(float *)(this_00 + 0x2e4);
      local_2c = *(undefined4 *)(this_00 + 0x2e8);
      lVar3 = (longdouble)CNavMesh::SnapToGrid(TheNavMesh,local_34,false);
      local_34 = (float)lVar3;
      lVar3 = (longdouble)CNavMesh::SnapToGrid(TheNavMesh,local_30,false);
      local_30 = (float)lVar3;
      cVar1 = CNavMesh::FindGroundForNode((CNavMesh *)this,(Vector *)&local_34,local_28);
      if (cVar1 != '\0') {
        CNavMesh::AddWalkableSeed((CNavMesh *)this,(Vector *)&local_34,local_28);
      }
      if (((byte)this_00[0x14d] & 8) == 0) {
        dVar5 = (double)*(float *)(this_00 + 0x2e8);
LAB_00977610:
        dVar4 = (double)*(float *)(this_00 + 0x2e4);
      }
      else {
        CBaseEntity::CalcAbsolutePosition(this_00);
        dVar5 = (double)*(float *)(this_00 + 0x2e8);
        if (((byte)this_00[0x14d] & 8) == 0) goto LAB_00977610;
        CBaseEntity::CalcAbsolutePosition(this_00);
        dVar4 = (double)*(float *)(this_00 + 0x2e4);
        if (((byte)this_00[0x14d] & 8) != 0) {
          CBaseEntity::CalcAbsolutePosition(this_00);
        }
      }
      puVar2 = *(undefined1 **)(this_00 + 0x154);
      if (puVar2 == (undefined1 *)0x0) {
        puVar2 = &DAT_00d539c2;
      }
      ZombieDebugPrint(2,"%s(%f %f %f)\n",puVar2,(double)*(float *)(this_00 + 0x2e0),dVar4,dVar5);
    }
    if (local_4c == (Vector *)&local_34) {
      return;
    }
    local_48 = *(char **)local_4c;
    local_4c = local_4c + 4;
  } while( true );
}

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)