L L4D2node

CNavMesh::AllocateGrid

0x00742ce0 · 153 bytes · __thiscall

_ZN8CNavMesh12AllocateGridEffff

Decompiled

undefined (5 params)

/* CNavMesh::AllocateGrid(float, float, float, float) */

void __thiscall
CNavMesh::AllocateGrid(CNavMesh *this,float param_1,float param_2,float param_3,float param_4)

{
  int iVar1;
  int iVar2;
  
  CUtlVector<CUtlVector<CNavArea*,CUtlMemory<CNavArea*,int>>,CUtlMemory<CUtlVector<CNavArea*,CUtlMemory<CNavArea*,int>>,int>>
  ::RemoveAll((CUtlVector<CUtlVector<CNavArea*,CUtlMemory<CNavArea*,int>>,CUtlMemory<CUtlVector<CNavArea*,CUtlMemory<CNavArea*,int>>,int>>
               *)(this + 0xc));
  *(float *)(this + 0x2c) = param_1;
  *(float *)(this + 0x30) = param_3;
  iVar2 = (int)((param_2 - param_1) / *(float *)(this + 0x20)) + 1;
  *(int *)(this + 0x24) = iVar2;
  iVar1 = (int)((param_4 - param_3) / *(float *)(this + 0x20)) + 1;
  *(int *)(this + 0x28) = iVar1;
  CUtlVector<CUtlVector<CNavArea*,CUtlMemory<CNavArea*,int>>,CUtlMemory<CUtlVector<CNavArea*,CUtlMemory<CNavArea*,int>>,int>>
  ::SetCount((CUtlVector<CUtlVector<CNavArea*,CUtlMemory<CNavArea*,int>>,CUtlMemory<CUtlVector<CNavArea*,CUtlMemory<CNavArea*,int>>,int>>
              *)(this + 0xc),iVar1 * iVar2);
  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)