DropToGround
0x004355a0 · 616 bytes · __cdecl
_Z12DropToGroundP11CBaseEntityRK6VectorS3_S3_
Decompiled
undefined (4 params)
/* DropToGround(CBaseEntity*, Vector const&, Vector const&, Vector const&) */
CBaseEntity * DropToGround(CBaseEntity *param_1,Vector *param_2,Vector *param_3,Vector *param_4)
{
char cVar1;
float *in_stack_00000014;
undefined4 local_ec;
CTraceFilterSimple local_dc [16];
float local_cc;
float local_c8;
float local_c4;
undefined4 local_bc;
undefined4 local_b8;
undefined4 local_b4;
float local_ac;
float local_a8;
float local_a4;
float local_9c;
float local_98;
float local_94;
undefined4 local_8c;
undefined1 local_88;
undefined1 local_87;
Vector local_70 [12];
undefined4 local_64;
undefined4 local_60;
undefined4 local_5c;
if (param_2 != (Vector *)0x0) {
cVar1 = (**(code **)(*(int *)param_2 + 0x16c))(param_2);
if (cVar1 != '\0') {
local_ec = (**(code **)(*(int *)param_2 + 0x7a0))(param_2,0);
goto LAB_004355d6;
}
}
local_ec = 0x200400b;
LAB_004355d6:
local_87 = 1;
local_bc = 0;
local_b8 = 0;
local_b4 = 0xc3fa0000;
local_8c = 0;
local_ac = (*in_stack_00000014 + *(float *)param_4) * 0.5;
local_9c = (*in_stack_00000014 - *(float *)param_4) * 0.5;
local_98 = (in_stack_00000014[1] - *(float *)(param_4 + 4)) * 0.5;
local_a8 = (in_stack_00000014[1] + *(float *)(param_4 + 4)) * 0.5;
local_94 = (in_stack_00000014[2] - *(float *)(param_4 + 8)) * 0.5;
local_a4 = (in_stack_00000014[2] + *(float *)(param_4 + 8)) * 0.5;
local_c8 = *(float *)(param_3 + 4) + local_a8;
local_c4 = *(float *)(param_3 + 8) + local_a4;
local_a8 = -local_a8;
local_88 = local_98 * local_98 + local_9c * local_9c + local_94 * local_94 < 1e-06;
local_cc = *(float *)param_3 + local_ac;
local_ac = -local_ac;
local_a4 = -local_a4;
CTraceFilterSimple::CTraceFilterSimple
(local_dc,(IHandleEntity *)param_2,0,(_func_bool_IHandleEntity_ptr_int *)0x0);
(**(code **)(*enginetrace + 0x14))(enginetrace,&local_cc,local_ec,local_dc,local_70);
if (*(int *)(r_visualizetraces._28_4_ + 0x30) != 0) {
DebugDrawLine(local_70,(Vector *)&local_64,0xff,0xff,0,true,-1.0);
}
*(undefined4 *)param_1 = local_64;
*(undefined4 *)(param_1 + 4) = local_60;
*(undefined4 *)(param_1 + 8) = local_5c;
return param_1;
}
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.