testStitchConnection
0x00726e00 · 1063 bytes · __regparm3
_ZL20testStitchConnectionP8CNavAreaS0_RK6VectorS3_.isra.47
Decompiled
undefined (4 params)
/* testStitchConnection(CNavArea*, CNavArea*, Vector const&, Vector const&) [clone .isra.47] */
undefined4 __regparm3
testStitchConnection(CNavArea *param_1,CNavArea *param_2,Vector *param_3,Vector *param_4)
{
char cVar1;
int iVar2;
float local_170;
float local_160;
float local_15c;
float local_158;
float local_154;
float local_150;
float local_14c;
float local_148;
float local_144;
float local_140;
float local_13c;
float local_138;
float local_134;
undefined **local_130 [4];
undefined4 local_120;
float local_11c;
float local_118;
float local_114;
float local_10c;
float local_108;
float local_104;
float local_fc;
float local_f8;
float local_f4;
float local_ec;
float local_e8;
float local_e4;
undefined4 local_dc;
undefined1 local_d8;
undefined1 local_d7;
CGameTrace local_c4 [84];
Vector local_70 [12];
Vector local_64 [32];
float local_44;
char local_39;
local_160 = *(float *)param_1;
local_15c = *(float *)(param_1 + 4);
local_158 = *(float *)(param_1 + 8);
local_154 = *(float *)param_2;
local_150 = *(float *)(param_2 + 4);
local_14c = *(float *)(param_2 + 8);
CTraceFilterSimple::CTraceFilterSimple
((CTraceFilterSimple *)local_130,(IHandleEntity *)0x0,0,
(_func_bool_IHandleEntity_ptr_int *)0x0);
local_130[0] = &PTR_ShouldHitEntity_00ca1b68;
local_120 = 0xf;
cVar1 = TraceAdjacentNode(0,(Vector *)&local_160,(Vector *)&local_154,local_c4,400.0);
if (cVar1 != '\0') {
return 1;
}
iVar2 = 0xb7;
local_170 = 18.0;
while( true ) {
local_dc = 0;
local_148 = local_160;
local_144 = local_15c;
local_140 = local_158 + local_170;
local_13c = local_154;
local_10c = local_154 - local_160;
local_138 = local_150;
local_108 = local_150 - local_15c;
local_134 = local_170 + local_14c;
local_104 = local_134 - local_140;
local_d7 = local_108 * local_108 + local_10c * local_10c + local_104 * local_104 != 0.0;
local_ec = (NavTraceMaxs - NavTraceMins) * 0.5;
local_e8 = (DAT_00fe6ba4 - DAT_00fe6bb0) * 0.5;
local_e4 = (DAT_00fe6ba8 - DAT_00fe6bb4) * 0.5;
local_fc = (NavTraceMaxs + NavTraceMins) * 0.5;
local_f8 = (DAT_00fe6ba4 + DAT_00fe6bb0) * 0.5;
local_f4 = (DAT_00fe6ba8 + DAT_00fe6bb4) * 0.5;
local_118 = local_15c + local_f8;
local_f8 = -local_f8;
local_114 = local_140 + local_f4;
local_f4 = -local_f4;
local_d8 = local_e8 * local_e8 + local_ec * local_ec + local_e4 * local_e4 < 1e-06;
local_11c = local_160 + local_fc;
local_fc = -local_fc;
(**(code **)(*enginetrace + 0x14))
(enginetrace,&local_11c,0x2420b,(CTraceFilterSimple *)local_130,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') && (local_44 == 1.0)) break;
iVar2 = iVar2 + -1;
local_170 = local_170 + 1.0;
if (iVar2 == 0) {
return 0;
}
}
cVar1 = StayOnFloor((CGameTrace *)local_70,400.0);
if (cVar1 == '\0') {
return 0;
}
local_140 = local_158;
local_134 = local_158 + local_170;
local_13c = local_160;
local_138 = local_15c;
local_148 = local_160;
local_144 = local_15c;
UTIL_TraceHull((Vector *)&local_148,(Vector *)&local_13c,(Vector *)&NavTraceMins,
(Vector *)&NavTraceMaxs,0x2420b,(ITraceFilter *)local_130,(CGameTrace *)local_70);
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.