CVoxelTree::~CVoxelTree
0x001de430 · 334 bytes · __thiscall
_ZN10CVoxelTreeD1Ev
Decompiled
undefined (1 param)
/* CVoxelTree::~CVoxelTree() */
void __thiscall CVoxelTree::~CVoxelTree(CVoxelTree *this)
{
undefined4 *puVar1;
char cVar2;
CVoxelHash *pCVar3;
int iVar4;
uint uVar5;
CVoxelHash *this_00;
pCVar3 = *(CVoxelHash **)(this + 8);
*(undefined ***)this = &PTR__CVoxelTree_002be608;
if (pCVar3 != (CVoxelHash *)0x0) {
this_00 = pCVar3 + *(int *)(pCVar3 + -4) * 0x1050;
if (pCVar3 != this_00) {
do {
this_00 = this_00 + -0x1050;
CVoxelHash::~CVoxelHash(this_00);
pCVar3 = *(CVoxelHash **)(this + 8);
} while (pCVar3 != this_00);
}
operator_delete__(pCVar3 + -4);
}
while( true ) {
puVar1 = *(undefined4 **)(this + 0xd8);
uVar5 = *(uint *)(this + 0xdc);
if (puVar1 == (undefined4 *)0x0) break;
cVar2 = ThreadInterlockedAssignIf64(this + 0xd8,*puVar1,uVar5 - 1,puVar1,uVar5);
if (cVar2 != '\0') {
if (1 < *(ushort *)((int)puVar1 + 10)) {
free((void *)puVar1[4]);
}
puVar1[4] = 0;
operator_delete(puVar1);
}
}
iVar4 = 0;
while ((iVar4 != 0 &&
(cVar2 = ThreadInterlockedAssignIf64(this + 0xd8,0,uVar5 & 0xffff0000,iVar4,uVar5),
cVar2 == '\0'))) {
iVar4 = *(int *)(this + 0xd8);
uVar5 = *(uint *)(this + 0xdc);
}
*(undefined4 *)(this + 0xcc) = 0;
CUtlMemory<unsigned_short,int>::Purge((CUtlMemory<unsigned_short,int> *)(this + 0xc0));
*(undefined4 *)(this + 0xd0) = *(undefined4 *)(this + 0xc0);
CUtlMemory<unsigned_short,int>::Purge((CUtlMemory<unsigned_short,int> *)(this + 0xc0));
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();
return;
}
SourceMod gamedata
paste intoaddons/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.
Signatures + Functions block. The plugin uses
DHookCreateFromConf - DHooks reads return type, this-type,
calling convention, and argument types straight from the gamedata. Less
boilerplate in the plugin, types travel with the gamedata.
Gamedata KeyValues
DHooks plugin example
Type inference is best-effort from the C signature - sanity-check the DHooks types before shipping.