Cmd_PropCrosshair_f
0x001e4990 · 307 bytes · unknown
_Z19Cmd_PropCrosshair_fv
Decompiled
undefined (0 params)
/* WARNING: Unknown calling convention -- yet parameter storage is locked */
/* Cmd_PropCrosshair_f() */
void Cmd_PropCrosshair_f(void)
{
undefined **local_c0;
undefined4 local_bc;
undefined4 local_b8;
undefined4 local_b4;
float local_ac;
float local_a8;
float local_a4;
undefined4 local_9c;
undefined4 local_98;
undefined4 local_94;
undefined4 local_8c;
undefined4 local_88;
undefined4 local_84;
undefined4 local_7c;
undefined1 local_78;
undefined1 local_77;
undefined1 local_60 [80];
int local_10;
local_78 = 1;
local_7c = 0;
local_c0 = &PTR_ShouldHitEntity_002bf010;
local_ac = g_MainViewForward * 57016.32;
local_a8 = DAT_003a0004 * 57016.32;
local_a4 = DAT_003a0008 * 57016.32;
local_84 = 0;
local_88 = 0;
local_8c = 0;
local_77 = local_a8 * local_a8 + local_ac * local_ac + local_a4 * local_a4 != 0.0;
local_94 = 0;
local_98 = 0;
local_9c = 0;
local_bc = g_MainViewOrigin;
local_b8 = DAT_003a0044;
local_b4 = DAT_003a0048;
(**(code **)(*(int *)g_pEngineTraceServer + 0x14))
(g_pEngineTraceServer,&local_bc,0xffffffff,&local_c0,local_60);
if (0 < local_10) {
Msg("hit prop %d\n",local_10 + -1);
return;
}
Msg("didn\'t hit a prop\n");
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.