IsBoxIntersectingRay
0x000c5de0 · 366 bytes · __cdecl
_Z20IsBoxIntersectingRayRK6VectorS1_RK5Ray_tf
Decompiled
undefined (4 params)
/* IsBoxIntersectingRay(Vector const&, Vector const&, Ray_t const&, float) */
void IsBoxIntersectingRay(Vector *param_1,Vector *param_2,Ray_t *param_3,float param_4)
{
float local_24;
float local_20;
float local_1c;
float local_18;
float local_14;
float local_10;
if (param_3[0x45] == (Ray_t)0x0) {
local_24 = *(float *)param_3 - *(float *)(param_3 + 0x30);
local_20 = *(float *)(param_3 + 4) - *(float *)(param_3 + 0x34);
local_18 = *(float *)param_3 + *(float *)(param_3 + 0x30);
local_10 = *(float *)(param_3 + 8) + *(float *)(param_3 + 0x38);
local_1c = *(float *)(param_3 + 8) - *(float *)(param_3 + 0x38);
local_14 = *(float *)(param_3 + 4) + *(float *)(param_3 + 0x34);
if (param_4 != 0.0) {
local_20 = local_20 - param_4;
local_18 = local_18 + param_4;
local_24 = local_24 - param_4;
local_14 = local_14 + param_4;
local_10 = local_10 + param_4;
local_1c = local_1c - param_4;
}
IsBoxIntersectingBox(param_1,param_2,(Vector *)&local_24,(Vector *)&local_18);
return;
}
local_24 = *(float *)param_1 - *(float *)(param_3 + 0x30);
local_18 = *(float *)(param_3 + 0x30) + *(float *)param_2;
local_20 = *(float *)(param_1 + 4) - *(float *)(param_3 + 0x34);
local_14 = *(float *)(param_3 + 0x34) + *(float *)(param_2 + 4);
local_1c = *(float *)(param_1 + 8) - *(float *)(param_3 + 0x38);
local_10 = *(float *)(param_3 + 0x38) + *(float *)(param_2 + 8);
IsBoxIntersectingRay
((Vector *)&local_24,(Vector *)(param_3 + 0x10),(Vector *)&local_24,(Vector *)&local_18,
(float)param_3);
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.