UTIL_TraceLine
0x004d9000 · 300 bytes · __cdecl
_Z14UTIL_TraceLineRK6VectorS1_jPK13IHandleEntityiP10CGameTrace
Decompiled
undefined (6 params)
/* UTIL_TraceLine(Vector const&, Vector const&, unsigned int, IHandleEntity const*, int,
CGameTrace*) */
void UTIL_TraceLine(Vector *param_1,Vector *param_2,uint param_3,IHandleEntity *param_4,int param_5,
CGameTrace *param_6)
{
CTraceFilterSimple local_6c [16];
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;
local_1c = 0;
local_18 = 1;
local_5c = *(float *)param_1;
local_54 = *(float *)(param_1 + 8);
local_4c = *(float *)param_2 - local_5c;
local_58 = *(float *)(param_1 + 4);
local_44 = *(float *)(param_2 + 8) - local_54;
local_48 = *(float *)(param_2 + 4) - local_58;
local_24 = 0;
local_28 = 0;
local_17 = local_44 * local_44 + local_4c * local_4c + local_48 * local_48 != 0.0;
local_2c = 0;
local_34 = 0;
local_38 = 0;
local_3c = 0;
CTraceFilterSimple::CTraceFilterSimple
(local_6c,param_4,param_5,(_func_bool_IHandleEntity_ptr_int *)0x0);
(**(code **)(*enginetrace + 0x14))(enginetrace,&local_5c,param_3,local_6c,param_6);
if (*(int *)(r_visualizetraces._28_4_ + 0x30) != 0) {
DebugDrawLine((Vector *)param_6,(Vector *)(param_6 + 0xc),0xff,0,0,true,-1.0);
}
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.