L L4D2node

CBrushBSPIterator::EnumerateLeaf

0x0019e500 · 121 bytes · __cdecl

_ZN17CBrushBSPIterator13EnumerateLeafEii

Decompiled

undefined (2 params)

/* CBrushBSPIterator::EnumerateLeaf(int, int) */

undefined4 CBrushBSPIterator::EnumerateLeaf(int param_1,int param_2)

{
  int iVar1;
  uint uVar2;
  uint *puVar3;
  int iVar4;
  int iVar5;
  int iVar6;
  
  iVar5 = *(int *)(param_1 + 0xc);
  uVar2 = 0x20000;
  if (*(short *)(param_2 * 0x40 + *(int *)(iVar5 + 0x10) + 0x32) == -1) {
    uVar2 = 0x40000;
  }
  iVar4 = 0;
  iVar6 = *(int *)(param_1 + 8);
  iVar1 = *(int *)(iVar6 + 0x13c);
  if (0 < iVar1) {
    while( true ) {
      iVar6 = *(int *)(iVar6 + 0x138) + iVar4;
      iVar4 = iVar4 + 1;
      puVar3 = (uint *)(iVar6 * 0x20 + *(int *)(iVar5 + 0x78));
      *puVar3 = *puVar3 & 0xfff9ffff | uVar2;
      if (iVar4 == iVar1) break;
      iVar5 = *(int *)(param_1 + 0xc);
      iVar6 = *(int *)(param_1 + 8);
    }
  }
  *(int *)(param_1 + 0x10) = *(int *)(param_1 + 0x10) + 1;
  return 1;
}

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)