CDispInfo::TestRay
0x00134d10 · 397 bytes · __thiscall
_ZN9CDispInfo7TestRayERK5Ray_tffRfP8Vector2DS5_
Decompiled
undefined (7 params)
/* CDispInfo::TestRay(Ray_t const&, float, float, float&, Vector2D*, Vector2D*) */
undefined4 __thiscall
CDispInfo::TestRay(CDispInfo *this,Ray_t *param_1,float param_2,float param_3,float *param_4,
Vector2D *param_5,Vector2D *param_6)
{
int iVar1;
Ray_t *pRVar2;
undefined4 uVar3;
undefined1 local_70 [16];
float local_60;
float local_5c;
float local_58;
float local_54;
float local_4c;
float local_48;
float local_44;
undefined4 local_3c;
undefined4 local_38;
undefined4 local_34;
undefined4 local_2c;
undefined4 local_28;
undefined4 local_24;
undefined4 local_1c;
undefined1 local_18;
undefined1 local_17;
iVar1 = DispInfo_ComputeIndex(*(void **)(DAT_003a172c + 0x6c),(IDispInfo *)this);
pRVar2 = (Ray_t *)CollisionBSPData_GetCollisionTree(iVar1);
if (pRVar2 != (Ray_t *)0x0) {
local_1c = 0;
local_18 = 1;
local_60 = 1.0;
local_5c = param_2 * *(float *)(param_1 + 0x10) + *(float *)param_1;
local_58 = param_2 * *(float *)(param_1 + 0x14) + *(float *)(param_1 + 4);
local_54 = param_2 * *(float *)(param_1 + 0x18) + *(float *)(param_1 + 8);
local_4c = (*(float *)(param_1 + 0x10) * param_3 + *(float *)param_1) - local_5c;
local_48 = (*(float *)(param_1 + 0x14) * param_3 + *(float *)(param_1 + 4)) - local_58;
local_44 = (*(float *)(param_1 + 0x18) * param_3 + *(float *)(param_1 + 8)) - local_54;
local_24 = 0;
local_28 = 0;
local_2c = 0;
local_34 = 0;
local_38 = 0;
local_3c = 0;
local_17 = local_48 * local_48 + local_4c * local_4c + local_44 * local_44 != 0.0;
uVar3 = CDispCollTree::AABBTree_Ray(pRVar2,(RayDispOutput_t *)&local_5c);
if ((char)uVar3 != '\0') {
*param_4 = (1.0 - local_60) * param_2 + local_60 * param_3;
(**(code **)(*(int *)this + 0x44))(this,local_70,param_5,param_6);
return uVar3;
}
}
return 0;
}
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.