CDispCollTree::AABBTree_GenerateBoxes_r
0x000cb370 · 514 bytes · __thiscall
_ZN13CDispCollTree24AABBTree_GenerateBoxes_rEiP6VectorS1_
Decompiled
undefined (4 params)
/* CDispCollTree::AABBTree_GenerateBoxes_r(int, Vector*, Vector*) */
void __thiscall
CDispCollTree::AABBTree_GenerateBoxes_r
(CDispCollTree *this,int param_1,Vector *param_2,Vector *param_3)
{
ushort *puVar1;
int iVar2;
undefined4 *puVar3;
int iVar4;
Vector *pVVar5;
int iVar6;
Vector *pVVar7;
Vector *pVVar8;
undefined4 local_7c;
undefined4 uStack_78;
undefined4 uStack_74;
undefined4 uStack_70;
undefined4 uStack_6c;
undefined4 uStack_68;
undefined4 local_64;
undefined4 uStack_60;
undefined4 uStack_5c;
undefined4 uStack_58;
undefined4 uStack_54;
undefined4 uStack_50;
undefined4 local_4c;
undefined4 uStack_48;
undefined4 uStack_44;
undefined4 uStack_40;
undefined4 uStack_3c;
undefined4 uStack_38;
undefined4 local_34;
undefined4 uStack_30;
undefined4 uStack_2c;
undefined4 uStack_28;
undefined4 uStack_24;
undefined4 uStack_20;
ClearBounds(param_2,param_3);
iVar4 = *(int *)(this + 0x98);
if (iVar4 <= param_1) {
iVar6 = 0;
do {
iVar2 = iVar6 * 2;
iVar6 = iVar6 + 1;
puVar1 = (ushort *)
(*(int *)(this + 0x80) +
*(short *)(iVar2 + *(int *)(this + 0xa0) + (param_1 - iVar4) * 4) * 0x18);
AddPointToBounds((Vector *)(*(int *)(this + 0x70) + (*puVar1 & 0x1ff) * 0xc),param_2,param_3);
AddPointToBounds((Vector *)(*(int *)(this + 0x70) + (puVar1[1] & 0x1ff) * 0xc),param_2,param_3
);
AddPointToBounds((Vector *)(*(int *)(this + 0x70) + (puVar1[2] & 0x1ff) * 0xc),param_2,param_3
);
} while (iVar6 != 2);
return;
}
iVar4 = param_1 * 4;
pVVar5 = (Vector *)&local_4c;
pVVar7 = (Vector *)&local_7c;
do {
iVar4 = iVar4 + 1;
AABBTree_GenerateBoxes_r(this,iVar4,pVVar7,pVVar5);
pVVar8 = pVVar7 + 0xc;
AddPointToBounds(pVVar7,param_2,param_3);
AddPointToBounds(pVVar5,param_2,param_3);
pVVar5 = pVVar5 + 0xc;
pVVar7 = pVVar8;
} while (pVVar8 != (Vector *)&local_4c);
puVar3 = (undefined4 *)(*(int *)(this + 0x90) + param_1 * 0x60);
*puVar3 = local_7c;
puVar3[1] = uStack_78;
puVar3[2] = uStack_74;
puVar3[3] = uStack_70;
puVar3[4] = uStack_70;
puVar3[5] = uStack_6c;
puVar3[6] = uStack_68;
puVar3[7] = local_64;
puVar3[8] = local_64;
puVar3[9] = uStack_60;
puVar3[10] = uStack_5c;
puVar3[0xb] = uStack_58;
*puVar3 = local_7c;
puVar3[1] = uStack_70;
puVar3[2] = local_64;
puVar3[3] = uStack_58;
puVar3[4] = uStack_78;
puVar3[5] = uStack_6c;
puVar3[6] = uStack_60;
puVar3[7] = uStack_54;
puVar3[8] = uStack_74;
puVar3[9] = uStack_68;
puVar3[10] = uStack_5c;
puVar3[0xb] = uStack_50;
iVar4 = param_1 * 0x60 + *(int *)(this + 0x90);
*(undefined4 *)(iVar4 + 0x30) = local_4c;
*(undefined4 *)(iVar4 + 0x34) = uStack_48;
*(undefined4 *)(iVar4 + 0x38) = uStack_44;
*(undefined4 *)(iVar4 + 0x3c) = uStack_40;
*(undefined4 *)(iVar4 + 0x40) = uStack_40;
*(undefined4 *)(iVar4 + 0x44) = uStack_3c;
*(undefined4 *)(iVar4 + 0x48) = uStack_38;
*(undefined4 *)(iVar4 + 0x4c) = local_34;
*(undefined4 *)(iVar4 + 0x50) = local_34;
*(undefined4 *)(iVar4 + 0x54) = uStack_30;
*(undefined4 *)(iVar4 + 0x58) = uStack_2c;
*(undefined4 *)(iVar4 + 0x5c) = uStack_28;
*(undefined4 *)(iVar4 + 0x30) = local_4c;
*(undefined4 *)(iVar4 + 0x34) = uStack_40;
*(undefined4 *)(iVar4 + 0x38) = local_34;
*(undefined4 *)(iVar4 + 0x3c) = uStack_28;
*(undefined4 *)(iVar4 + 0x40) = uStack_48;
*(undefined4 *)(iVar4 + 0x44) = uStack_3c;
*(undefined4 *)(iVar4 + 0x48) = uStack_30;
*(undefined4 *)(iVar4 + 0x4c) = uStack_24;
*(undefined4 *)(iVar4 + 0x50) = uStack_44;
*(undefined4 *)(iVar4 + 0x54) = uStack_38;
*(undefined4 *)(iVar4 + 0x58) = uStack_2c;
*(undefined4 *)(iVar4 + 0x5c) = uStack_20;
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.