L L4D2node

CEngineBSPTree::ListLeavesInSphereWithFlagSet

0x001675f0 · 161 bytes · __thiscall

_ZN14CEngineBSPTree29ListLeavesInSphereWithFlagSetEPiRK6VectorfiPKtii

Decompiled

undefined (8 params)

/* CEngineBSPTree::ListLeavesInSphereWithFlagSet(int*, Vector const&, float, int, unsigned short
   const*, int, int) */

int __thiscall
CEngineBSPTree::ListLeavesInSphereWithFlagSet
          (CEngineBSPTree *this,int *param_1,Vector *param_2,float param_3,int param_4,
          ushort *param_5,int param_6,int param_7)

{
  char cVar1;
  int iVar2;
  int iVar3;
  int local_24;
  
  if (param_4 < 1) {
    local_24 = 0;
  }
  else {
    iVar3 = 0;
    local_24 = 0;
    do {
      while ((iVar2 = (uint)*param_5 * 0x40 + *(int *)(DAT_003a172c + 0x10),
             (param_7 & *(short *)(iVar2 + 0xe)) != 0 &&
             (cVar1 = IsBoxIntersectingSphereExtents
                                ((Vector *)(iVar2 + 0x10),(Vector *)(iVar2 + 0x20),param_2,param_3),
             cVar1 != '\0'))) {
        param_5 = (ushort *)((int)param_5 + param_6);
        param_1[local_24] = iVar3;
        iVar3 = iVar3 + 1;
        local_24 = local_24 + 1;
        if (iVar3 == param_4) {
          return local_24;
        }
      }
      iVar3 = iVar3 + 1;
      param_5 = (ushort *)((int)param_5 + param_6);
    } while (iVar3 != param_4);
  }
  return local_24;
}

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)