L L4D2node

Hunk_OnMapStart

0x002402b0 · 67 bytes · __cdecl

_Z15Hunk_OnMapStarti

Decompiled

undefined (1 param)

/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
/* Hunk_OnMapStart(int) */

void Hunk_OnMapStart(int param_1)

{
  int iVar1;
  int iVar2;
  
  iVar2 = 0x2000000;
  if (0x1ffffff < param_1) {
    iVar2 = param_1;
  }
  iVar1 = CMemoryStack::GetSize((CMemoryStack *)&g_HunkMemoryStack);
  if (iVar2 != iVar1) {
    CMemoryStack::CommitTo((uchar *)&g_HunkMemoryStack);
  }
  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)