CDispCollTree::EdgeCrossAxis<2>
0x000cfa00 · 329 bytes · __thiscall
_ZN13CDispCollTree13EdgeCrossAxisILi2EEEbRK5Ray_ttP15CDispCollHelper
Decompiled
bool (4 params)
/* bool CDispCollTree::EdgeCrossAxis<2>(Ray_t const&, unsigned short, CDispCollHelper*) */
bool __thiscall
CDispCollTree::EdgeCrossAxis<2>
(CDispCollTree *this,Ray_t *param_1,ushort param_2,CDispCollHelper *param_3)
{
float *pfVar1;
undefined1 uVar2;
float fVar3;
float fVar4;
float fVar5;
float local_14;
float local_10;
undefined4 local_c;
if (param_2 != 0xffff) {
if ((short)param_2 < 0) {
pfVar1 = (float *)(*(int *)(this + 0xc4) + (param_2 & 0x7fff) * 0xc);
local_14 = -*pfVar1;
local_10 = -pfVar1[1];
fVar5 = -pfVar1[2];
}
else {
pfVar1 = (float *)(*(int *)(this + 0xc4) + (uint)param_2 * 0xc);
local_14 = *pfVar1;
local_10 = pfVar1[1];
fVar5 = pfVar1[2];
}
local_c = 0;
fVar3 = *(float *)(param_1 + 0x30);
if (0.0 <= local_14) {
fVar3 = -fVar3;
}
fVar4 = *(float *)(param_1 + 0x34);
if (0.0 <= local_10) {
fVar4 = -fVar4;
}
fVar3 = (fVar5 - fVar3 * local_14) - fVar4 * local_10;
uVar2 = ResolveRayPlaneIntersect
(this,(local_10 * *(float *)(param_1 + 4) + local_14 * *(float *)param_1) -
fVar3,
((*(float *)(param_1 + 0x14) + *(float *)(param_1 + 4)) * local_10 +
(*(float *)(param_1 + 0x10) + *(float *)param_1) * local_14) - fVar3,
(Vector *)&local_14,fVar5,param_3);
return (bool)uVar2;
}
return 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.