L L4D2node

CNavMesh::DestroyHidingSpots

0x0073ec10 · 166 bytes · __cdecl

_ZN8CNavMesh18DestroyHidingSpotsEv

Decompiled

undefined (0 params)

/* CNavMesh::DestroyHidingSpots() */

void CNavMesh::DestroyHidingSpots(void)

{
  int iVar1;
  undefined4 *__ptr;
  int *piVar2;
  int *__ptr_00;
  int iVar3;
  
  iVar3 = 0;
  if (0 < DAT_00fe6000) {
    do {
      iVar1 = *(int *)(TheNavAreas + iVar3 * 4);
      __ptr = *(undefined4 **)(iVar1 + 0xcc);
      if (__ptr != &CUtlVectorUltraConservative<HidingSpot*,CUtlVectorUltraConservativeAllocator>::
                    StaticData()::staticData) {
        free(__ptr);
        *(undefined4 **)(iVar1 + 0xcc) =
             &CUtlVectorUltraConservative<HidingSpot*,CUtlVectorUltraConservativeAllocator>::
              StaticData()::staticData;
      }
      iVar3 = iVar3 + 1;
    } while (iVar3 < DAT_00fe6000);
  }
  iVar3 = 0;
  HidingSpot::m_nextID = 0;
  __ptr_00 = TheHidingSpots;
  if (0 < *TheHidingSpots) {
    do {
      piVar2 = (int *)__ptr_00[iVar3 + 1];
      if (piVar2 != (int *)0x0) {
        (**(code **)(*piVar2 + 4))(piVar2);
        __ptr_00 = TheHidingSpots;
      }
      iVar3 = iVar3 + 1;
    } while (iVar3 < *__ptr_00);
  }
  if (__ptr_00 !=
      &CUtlVectorUltraConservative<HidingSpot*,CUtlVectorUltraConservativeAllocator>::StaticData()::
       staticData) {
    free(__ptr_00);
    TheHidingSpots =
         &CUtlVectorUltraConservative<HidingSpot*,CUtlVectorUltraConservativeAllocator>::
          StaticData()::staticData;
  }
  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)