CNavNode::TestForCrouchArea
0x00746110 · 1852 bytes · __thiscall
_ZN8CNavNode17TestForCrouchAreaE13NavCornerTypeRK6VectorS3_Pf
Decompiled
undefined (5 params)
/* CNavNode::TestForCrouchArea(NavCornerType, Vector const&, Vector const&, float*) */
undefined4 __thiscall
CNavNode::TestForCrouchArea
(CNavNode *this,int param_2,Vector *param_3,Vector *param_4,float *param_5)
{
float fVar1;
float fVar2;
float fVar3;
int iVar4;
int iVar5;
int iVar6;
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;
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];
Vector local_64 [8];
float local_5c;
char local_39;
CTraceFilterSimple::CTraceFilterSimple
((CTraceFilterSimple *)local_e0,(IHandleEntity *)0x0,8,
(_func_bool_IHandleEntity_ptr_int *)0x0);
local_e0[0] = &PTR_ShouldHitEntity_00ca1b68;
local_ec = *(float *)this;
local_87 = 1;
local_d0 = 0xf;
local_bc = 0;
local_b8 = 0;
local_b4 = 0x42800000;
local_9c = (NavTraceMaxs - NavTraceMins) * 0.5;
local_8c = 0;
local_98 = (DAT_00fe6ba4 - DAT_00fe6bb0) * 0.5;
local_94 = (DAT_00fe6ba8 - DAT_00fe6bb4) * 0.5;
local_e8 = *(float *)(this + 4);
local_e4 = *(float *)(this + 8);
local_ac = (NavTraceMaxs + NavTraceMins) * 0.5;
local_a8 = (DAT_00fe6ba4 + DAT_00fe6bb0) * 0.5;
local_a4 = (DAT_00fe6ba8 + DAT_00fe6bb4) * 0.5;
local_cc = local_ec + local_ac;
local_88 = local_98 * local_98 + local_9c * local_9c + local_94 * local_94 < 1e-06;
local_c8 = local_e8 + local_a8;
local_c4 = local_e4 + local_a4;
local_ac = -local_ac;
local_a8 = -local_a8;
local_a4 = -local_a4;
(**(code **)(*enginetrace + 0x14))(enginetrace,&local_cc,0x2420b,local_e0,local_70);
if (*(int *)(r_visualizetraces._28_4_ + 0x30) != 0) {
DebugDrawLine(local_70,local_64,0xff,0xff,0,true,-1.0);
}
local_f0 = 0.0;
fVar3 = local_5c - local_e4;
fVar1 = *(float *)param_4;
fVar2 = *(float *)(param_4 + 4);
if (0.0 <= fVar3) {
do {
local_87 = 0;
local_bc = 0;
local_e4 = local_f0 + *(float *)(this + 8);
local_b8 = 0;
local_b4 = 0;
local_8c = 0;
local_ec = *(float *)this;
local_9c = (fVar1 - *(float *)param_3) * 0.5;
local_e8 = *(float *)(this + 4);
local_98 = (fVar2 - *(float *)(param_3 + 4)) * 0.5;
local_94 = (55.0 - *(float *)(param_3 + 8)) * 0.5;
local_ac = (*(float *)param_3 + fVar1) * 0.5;
local_a8 = (*(float *)(param_3 + 4) + fVar2) * 0.5;
local_a4 = (*(float *)(param_3 + 8) + 55.0) * 0.5;
local_cc = local_ec + local_ac;
local_c8 = local_e8 + local_a8;
local_88 = local_9c * local_9c + local_98 * local_98 + local_94 * local_94 < 1e-06;
local_c4 = local_e4 + local_a4;
local_ac = -local_ac;
local_a8 = -local_a8;
local_a4 = -local_a4;
(**(code **)(*enginetrace + 0x14))(enginetrace,&local_cc,0x2420b,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') {
local_87 = 0;
local_bc = 0;
local_b8 = 0;
local_b4 = 0;
*param_5 = local_e4 - *(float *)(this + 8);
local_8c = 0;
local_9c = (fVar1 - *(float *)param_3) * 0.5;
local_98 = (fVar2 - *(float *)(param_3 + 4)) * 0.5;
local_94 = (71.0 - *(float *)(param_3 + 8)) * 0.5;
local_ac = (*(float *)param_3 + fVar1) * 0.5;
local_a8 = (*(float *)(param_3 + 4) + fVar2) * 0.5;
local_a4 = (*(float *)(param_3 + 8) + 71.0) * 0.5;
local_cc = local_ec + local_ac;
local_c8 = local_e8 + local_a8;
local_88 = local_9c * local_9c + local_98 * local_98 + local_94 * local_94 < 1e-06;
local_ac = -local_ac;
local_a8 = -local_a8;
local_c4 = local_e4 + local_a4;
local_a4 = -local_a4;
(**(code **)(*enginetrace + 0x14))(enginetrace,&local_cc,0x2420b,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') {
if (*(int *)(nav_test_node_crouch._28_4_ + 0x30) != *(int *)(this + 0x58)) {
return 1;
}
local_f0 = 1.4013e-45;
iVar6 = 0xff;
iVar5 = 0xff;
iVar4 = 0;
}
else {
local_f0 = 0.0;
if (*(int *)(nav_test_node_crouch._28_4_ + 0x30) != *(int *)(this + 0x58)) {
return 0;
}
iVar6 = 0;
iVar5 = 0;
iVar4 = 0xff;
}
NDebugOverlay::Box((Vector *)&local_ec,param_3,param_4,iVar4,iVar5,iVar6,100,100.0);
return local_f0;
}
local_f0 = local_f0 + 1.0;
} while (local_f0 <= fVar3);
}
*param_5 = 64.0;
this[param_2 + 0x78] = (CNavNode)0x1;
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.