CVoxelHash::LeafListRaySetup
0x001dc300 · 475 bytes · __thiscall
_ZN10CVoxelHash16LeafListRaySetupERK5Ray_tRK6VectorS5_7Voxel_tPiPfS8_
Decompiled
undefined (8 params)
/* CVoxelHash::LeafListRaySetup(Ray_t const&, Vector const&, Vector const&, Voxel_t, int*, float*,
float*) */
void __thiscall
CVoxelHash::LeafListRaySetup
(CVoxelHash *this,float *param_1,float *param_2,int param_3,uint param_5,int param_6,
int param_7,int param_8)
{
int iVar1;
float fVar2;
float fVar3;
float fVar4;
uint local_34 [3];
float local_28 [6];
local_34[0] = param_5 & 0x7ff;
local_28[1] = param_1[1] - *(float *)(this + 4);
local_28[0] = *param_1 - *(float *)this;
local_34[2] = param_5 >> 0x16;
local_34[1] = param_5 >> 0xb & 0x7ff;
local_28[2] = param_1[2] - *(float *)(this + 8);
local_28[3] = *param_2 - *(float *)this;
local_28[4] = param_2[1] - *(float *)(this + 4);
iVar1 = 0;
local_28[5] = param_2[2] - *(float *)(this + 8);
if (local_28[0] != local_28[3]) goto LAB_001dc3e9;
LAB_001dc3ae:
*(undefined4 *)(param_6 + iVar1 * 4) = 0;
*(undefined4 *)(param_7 + iVar1 * 4) = 0x47800000;
*(undefined4 *)(param_8 + iVar1 * 4) = 0x47800000;
do {
iVar1 = iVar1 + 1;
if (iVar1 == 3) {
return;
}
while( true ) {
if (local_28[iVar1] == local_28[iVar1 + 3]) goto LAB_001dc3ae;
LAB_001dc3e9:
if (param_1[iVar1 + 4] <= 0.0 && param_1[iVar1 + 4] != 0.0) {
*(undefined4 *)(param_6 + iVar1 * 4) = 0xffffffff;
fVar2 = (float)(int)(local_34[iVar1] *
(0x100 << ((char)*(undefined4 *)(this + 0x104c) * '\x02' & 0x1fU)));
fVar3 = local_28[iVar1] - fVar2;
fVar2 = local_28[iVar1 + 3] - fVar2;
fVar4 = -*(float *)(param_3 + iVar1 * 4);
}
else {
*(undefined4 *)(param_6 + iVar1 * 4) = 1;
fVar2 = (float)(int)(~local_34[iVar1] *
(0x100 << ((char)*(undefined4 *)(this + 0x104c) * '\x02' & 0x1fU)));
fVar4 = *(float *)(param_3 + iVar1 * 4);
fVar3 = -(local_28[iVar1] + fVar2);
fVar2 = -(fVar2 + local_28[iVar1 + 3]);
}
if ((fVar2 <= 0.0) || (fVar3 <= 0.0)) break;
*(undefined4 *)(param_7 + iVar1 * 4) = 0x47800000;
*(undefined4 *)(param_8 + iVar1 * 4) = 0x47800000;
iVar1 = iVar1 + 1;
if (iVar1 == 3) {
return;
}
}
*(float *)(param_7 + iVar1 * 4) = fVar3 * fVar4;
*(float *)(param_8 + iVar1 * 4) =
(float)(0x100 << ((char)*(undefined4 *)(this + 0x104c) * '\x02' & 0x1fU)) * fVar4;
} while( true );
}
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.