IsValidJumpDownConnection
0x007245c0 · 897 bytes · __cdecl
_Z25IsValidJumpDownConnectionP8CNavAreaS0_10NavDirType
Decompiled
undefined (3 params)
/* IsValidJumpDownConnection(CNavArea*, CNavArea*, NavDirType) */
undefined1 IsValidJumpDownConnection(CNavArea *param_1,CNavArea *param_2,uint param_3)
{
undefined4 uVar1;
float fVar2;
undefined1 local_fc [4];
float local_f8;
float local_f4;
float local_f0;
float local_ec;
float local_e8;
float local_e4;
undefined **local_e0 [4];
undefined4 local_d0;
float local_cc;
float local_c8;
float local_c4;
undefined4 local_bc;
undefined4 local_b8;
float 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];
Vector local_64 [32];
float local_44;
char local_39;
CNavArea::ComputePortal(param_1,param_2,param_3,&local_f8,local_fc);
uVar1 = 0;
if (param_3 < 4) {
uVar1 = (&CSWTCH_1514)[param_3];
}
CNavArea::ComputePortal(param_2,param_1,uVar1,&local_ec,local_fc);
if ((ABS(local_f0 - local_e4) <= 5.0) &&
(625.0 <= (local_f4 - local_e8) * (local_f4 - local_e8) +
(local_f8 - local_ec) * (local_f8 - local_ec))) {
fVar2 = (local_f0 + local_e4) * 0.5;
CTraceFilterSimple::CTraceFilterSimple
((CTraceFilterSimple *)local_e0,(IHandleEntity *)0x0,0,
(_func_bool_IHandleEntity_ptr_int *)0x0);
local_bc = 0;
local_b8 = 0;
local_e0[0] = &PTR_ShouldHitEntity_00ca1b68;
local_d0 = 0xf;
local_8c = 0;
local_b4 = (fVar2 - 41.8) - fVar2;
local_9c = (WalkableTraceMaxs - WalkableTraceMins) * 0.5;
local_87 = local_b4 * local_b4 != 0.0;
local_98 = (DAT_0101692c - DAT_01016938) * 0.5;
local_94 = (DAT_01016930 - DAT_0101693c) * 0.5;
local_ac = (WalkableTraceMins + WalkableTraceMaxs) * 0.5;
local_88 = local_98 * local_98 + local_9c * local_9c + local_94 * local_94 < 1e-06;
local_a8 = (DAT_01016938 + DAT_0101692c) * 0.5;
local_cc = (local_f8 + local_ec) * 0.5 + local_ac;
local_a4 = (DAT_0101693c + DAT_01016930) * 0.5;
local_c8 = (local_f4 + local_e8) * 0.5 + local_a8;
local_c4 = fVar2 + local_a4;
local_ac = -local_ac;
local_a8 = -local_a8;
local_a4 = -local_a4;
(**(code **)(*enginetrace + 0x14))
(enginetrace,&local_cc,0x2420b,(CTraceFilterSimple *)local_e0,local_70);
if (*(int *)(r_visualizetraces._28_4_ + 0x30) != 0) {
DebugDrawLine(local_70,local_64,0xff,0xff,0,true,-1.0);
}
if (local_39 != '\0') {
return 0;
}
if (local_44 != 1.0) {
return 0;
}
}
return 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.