L L4D2node

CNavVectorNoEditAllocator::Realloc

0x006fa3b0 · 142 bytes · __cdecl

_ZN25CNavVectorNoEditAllocator7ReallocEPvj

Decompiled

undefined (2 params)

/* CNavVectorNoEditAllocator::Realloc(void*, unsigned int) */

void * CNavVectorNoEditAllocator::Realloc(void *param_1,uint param_2)

{
  uint uVar1;
  char cVar2;
  
  if (param_1 != m_pCurrent) {
    Error("Nav mesh cannot be mutated after load\n");
  }
  if (m_nBytesCurrent < param_2) {
    uVar1 = DAT_00fe5c88;
    if (param_2 - m_nBytesCurrent != 0) {
      uVar1 = -DAT_00fe5c88 & (param_2 - m_nBytesCurrent) + -1 + DAT_00fe5c88;
    }
    uVar1 = uVar1 + m_memory;
    if ((DAT_00fe5c74 < uVar1) &&
       (cVar2 = CMemoryStack::CommitTo((uchar *)&m_memory), cVar2 == '\0')) {
      uVar1 = m_memory;
    }
    m_memory = uVar1;
    m_nBytesCurrent = param_2;
  }
  return m_pCurrent;
}

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)