L L4D2node

CVoxelHash::Init

0x001dd340 · 251 bytes · __thiscall

_ZN10CVoxelHash4InitEP10CVoxelTreeRK6VectorS4_i

Decompiled

undefined (5 params)

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

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

{
  void *pvVar1;
  int iVar2;
  void *pvVar3;
  CVoxelHash *pCVar4;
  int iVar5;
  
  *(int *)(this + 0x104c) = param_4;
  *(CVoxelTree **)(this + 0x1048) = param_1;
  iVar2 = 0x80 >> ((byte)param_4 * '\x02' & 0x1f);
  if (iVar2 < 1) {
    iVar2 = 1;
  }
  iVar5 = 0;
  *(undefined4 *)this = 0xc6800000;
  *(undefined4 *)(this + 4) = 0xc6800000;
  *(undefined4 *)(this + 8) = 0xc6800000;
  *(int *)(this + 0x1010) = iVar2;
  *(int *)(this + 0x1014) = iVar2;
  *(int *)(this + 0x1018) = iVar2;
  pCVar4 = this + 0xc;
  do {
    pvVar3 = *(void **)pCVar4;
    if (*(void **)pCVar4 != (void *)0x0) {
      do {
        pvVar1 = *(void **)((int)pvVar3 + 0xc);
        operator_delete(pvVar3);
        pvVar3 = pvVar1;
      } while (pvVar1 != *(void **)pCVar4);
    }
    iVar5 = iVar5 + 1;
    *(int *)pCVar4 = 0;
    *(int *)(pCVar4 + 4) = 0;
    pCVar4 = pCVar4 + 8;
  } while (iVar5 != 0x200);
  iVar2 = 0x100 >> ((byte)param_4 & 0x1f);
  *(undefined4 *)(this + 0x100c) = 0;
  if (iVar2 < 0x10) {
    iVar2 = 0x10;
  }
  CUtlLinkedList<unsigned_short,int,true,int,CUtlFixedMemory<UtlLinkedListElem_t<unsigned_short,int>>>
  ::Purge((CUtlLinkedList<unsigned_short,int,true,int,CUtlFixedMemory<UtlLinkedListElem_t<unsigned_short,int>>>
           *)(this + 0x101c));
  CUtlLinkedList<unsigned_short,int,true,int,CUtlFixedMemory<UtlLinkedListElem_t<unsigned_short,int>>>
  ::RemoveAll((CUtlLinkedList<unsigned_short,int,true,int,CUtlFixedMemory<UtlLinkedListElem_t<unsigned_short,int>>>
               *)(this + 0x101c));
  CUtlFixedMemory<UtlLinkedListElem_t<unsigned_short,int>>::Purge();
  *(int *)(this + 0x1024) = iVar2;
  *(undefined4 *)(this + 0x1044) = 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)