L L4D2node

CVoxelTree::Init

0x001de1f0 · 151 bytes · __thiscall

_ZN10CVoxelTree4InitEP17CSpatialPartitioniRK6VectorS4_

Decompiled

undefined (5 params)

/* CVoxelTree::Init(CSpatialPartition*, int, Vector const&, Vector const&) */

void __thiscall
CVoxelTree::Init(CVoxelTree *this,CSpatialPartition *param_1,int param_2,Vector *param_3,
                Vector *param_4)

{
  int iVar1;
  CVoxelTree *pCVar2;
  int iVar3;
  
  *(CSpatialPartition **)(this + 0xbc) = param_1;
  *(int *)(this + 0x38) = param_2;
  pCVar2 = this + 0x3c;
  for (iVar1 = 0x20; iVar1 != 0; iVar1 = iVar1 + -1) {
    *(undefined4 *)pCVar2 = 0;
    pCVar2 = pCVar2 + 4;
  }
  iVar1 = 0;
  if (0 < *(int *)(this + 4)) {
    do {
      iVar3 = iVar1 + 1;
      CVoxelHash::Init((CVoxelHash *)(iVar1 * 0x1050 + *(int *)(this + 8)),this,param_3,param_4,
                       iVar1);
      iVar1 = iVar3;
    } while (iVar3 < *(int *)(this + 4));
  }
  CUtlLinkedList<LeafListData_t,int,true,int,CUtlFixedMemory<UtlLinkedListElem_t<LeafListData_t,int>>>
  ::Purge((CUtlLinkedList<LeafListData_t,int,true,int,CUtlFixedMemory<UtlLinkedListElem_t<LeafListData_t,int>>>
           *)(this + 0xc));
  CUtlLinkedList<LeafListData_t,int,true,int,CUtlFixedMemory<UtlLinkedListElem_t<LeafListData_t,int>>>
  ::RemoveAll((CUtlLinkedList<LeafListData_t,int,true,int,CUtlFixedMemory<UtlLinkedListElem_t<LeafListData_t,int>>>
               *)(this + 0xc));
  CUtlFixedMemory<UtlLinkedListElem_t<LeafListData_t,int>>::Purge();
  *(undefined4 *)(this + 0x14) = 0x200;
  *(undefined4 *)(this + 0x34) = 0;
  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)