CVEngineServer::GetAllClusterBounds
0x0022c960 · 358 bytes · __thiscall
_ZN14CVEngineServer19GetAllClusterBoundsEP6bbox_ti
Decompiled
undefined (3 params)
/* CVEngineServer::GetAllClusterBounds(bbox_t*, int) */
int __thiscall CVEngineServer::GetAllClusterBounds(CVEngineServer *this,bbox_t *param_1,int param_2)
{
short sVar1;
bbox_t *pbVar2;
byte *pbVar3;
int iVar4;
int iVar5;
int iVar6;
float local_34;
float local_30;
float local_2c;
float local_28;
float local_24;
float local_20;
if ((DAT_003943dc == (int *)0x0) || (DAT_003a172c == 0)) {
return 0;
}
iVar4 = *DAT_003943dc;
if (param_2 <= *DAT_003943dc) {
iVar4 = param_2;
}
if (0 < iVar4) {
iVar5 = 0;
pbVar2 = param_1;
do {
iVar5 = iVar5 + 1;
ClearBounds((Vector *)pbVar2,(Vector *)(pbVar2 + 0xc));
pbVar2 = (bbox_t *)(pbVar2 + 0x18);
} while (iVar5 != iVar4);
}
iVar6 = 0;
iVar5 = DAT_003a172c;
if (0 < *(int *)(DAT_003a172c + 0xc)) {
do {
while (((pbVar3 = (byte *)(iVar6 * 0x40 + *(int *)(iVar5 + 0x10)), (*pbVar3 & 1) != 0 ||
(sVar1 = *(short *)(pbVar3 + 0x30), sVar1 < 0)) || (iVar4 <= sVar1))) {
iVar6 = iVar6 + 1;
if (*(int *)(iVar5 + 0xc) <= iVar6) goto LAB_0022cab0;
}
iVar6 = iVar6 + 1;
local_34 = *(float *)(pbVar3 + 0x10) - *(float *)(pbVar3 + 0x20);
local_28 = *(float *)(pbVar3 + 0x10) + *(float *)(pbVar3 + 0x20);
local_30 = *(float *)(pbVar3 + 0x14) - *(float *)(pbVar3 + 0x24);
local_24 = *(float *)(pbVar3 + 0x14) + *(float *)(pbVar3 + 0x24);
local_2c = *(float *)(pbVar3 + 0x18) - *(float *)(pbVar3 + 0x28);
local_20 = *(float *)(pbVar3 + 0x18) + *(float *)(pbVar3 + 0x28);
AddPointToBounds((Vector *)&local_34,(Vector *)(param_1 + sVar1 * 0x18),
(Vector *)(param_1 + sVar1 * 0x18) + 0xc);
AddPointToBounds((Vector *)&local_28,(Vector *)(param_1 + *(short *)(pbVar3 + 0x30) * 0x18),
(Vector *)(param_1 + *(short *)(pbVar3 + 0x30) * 0x18) + 0xc);
iVar5 = DAT_003a172c;
} while (iVar6 < *(int *)(DAT_003a172c + 0xc));
}
LAB_0022cab0:
return *DAT_003943dc;
}
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.