L L4D2node

CBlackBox::Flush

0x00113a10 · 129 bytes · __thiscall

_ZN9CBlackBox5FlushEi

Decompiled

undefined (2 params)

/* CBlackBox::Flush(int) */

void __thiscall CBlackBox::Flush(CBlackBox *this,int param_1)

{
  void *pvVar1;
  int iVar2;
  
  if ((uint)param_1 < 3) {
    iVar2 = 0;
    if (0 < *(int *)(this + param_1 * 0x14 + 0x10)) {
      do {
        pvVar1 = *(void **)(*(int *)(this + param_1 * 0x14 + 4) + iVar2 * 4);
        if (pvVar1 != (void *)0x0) {
          if (*(void **)((int)pvVar1 + 8) != (void *)0x0) {
            operator_delete(*(void **)((int)pvVar1 + 8));
          }
          operator_delete(pvVar1);
        }
        iVar2 = iVar2 + 1;
      } while (iVar2 < *(int *)(this + param_1 * 0x14 + 0x10));
    }
    *(undefined4 *)(this + param_1 * 0x14 + 0x10) = 0;
    CUtlMemory<CBlackBoxRecord*,int>::Purge
              ((CUtlMemory<CBlackBoxRecord*,int> *)(this + param_1 * 0x14 + 4));
    *(undefined4 *)(this + param_1 * 0x14 + 0x14) = *(undefined4 *)(this + param_1 * 0x14 + 4);
    return;
  }
  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)