CNavMesh::GetGroundHeight
0x0073cd80 · 1208 bytes · __thiscall
_ZNK8CNavMesh15GetGroundHeightERK6VectorPfPS0_
Decompiled
undefined (4 params)
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
/* CNavMesh::GetGroundHeight(Vector const&, float*, Vector*) const */
undefined4 __thiscall
CNavMesh::GetGroundHeight(CNavMesh *this,Vector *param_1,float *param_2,Vector *param_3)
{
undefined4 uVar1;
int iVar2;
char cVar3;
int iVar4;
undefined4 uVar5;
float fVar6;
float local_100;
undefined4 local_f4;
undefined4 local_f0;
undefined4 local_ec;
undefined4 local_e8;
int local_e4;
undefined **local_e0 [4];
undefined4 local_d0;
undefined4 local_cc;
undefined4 local_c8;
float local_c4;
undefined4 local_bc;
undefined4 local_b8;
float local_b4;
undefined4 local_ac;
undefined4 local_a8;
undefined4 local_a4;
undefined4 local_9c;
undefined4 local_98;
undefined4 local_94;
undefined4 local_8c;
undefined1 local_88;
undefined1 local_87;
Vector local_70 [12];
Vector local_64 [8];
float local_5c;
float local_58;
float local_54;
float local_50;
float local_44;
char local_39;
local_f4 = 0;
local_f0 = 0;
if (___atan2f_finite == 0) {
local_e4 = 0;
}
else {
(**(code **)(___atan2f_finite + 0x50))
(___atan2f_finite,&local_f4,0,0,0,0,"/data/src/game/server/nav_mesh.cpp",0x54a,
&GetGroundHeight(Vector_const&,float*,Vector*)::tm_fmt,"(%s)%s","Unaccounted",
"CNavMesh::GetGroundHeight");
local_e4 = ___atan2f_finite;
}
iVar2 = _DAT_0105db00;
local_ec = local_f4;
local_e8 = local_f0;
/* try { // try from 0073d106 to 0073d154 has its CatchHandler @ 0073d255 */
if (((_DAT_0105d154 != 0) || (DAT_0105d158 == '\0')) &&
(iVar4 = ThreadGetCurrentId(), iVar2 == iVar4)) {
if ((char *)*_DAT_0105d15c != "CNavMesh::GetGroundHeight") {
_DAT_0105d15c =
(int *)CVProfNode::GetSubNode((char *)_DAT_0105d15c,0xca5a34,(char *)0x1,0xbfafa1);
}
CVProfNode::EnterScope();
DAT_0105d158 = '\0';
}
/* try { // try from 0073ce70 to 0073cfff has its CatchHandler @ 0073d26d */
CTraceFilterSimple::CTraceFilterSimple
((CTraceFilterSimple *)local_e0,(IHandleEntity *)0x0,0,
(_func_bool_IHandleEntity_ptr_int *)0x0);
local_100 = *(float *)(param_1 + 8);
local_d0 = 0xf;
local_e0[0] = &PTR_ShouldHitEntity_00ca8628;
uVar5 = *(undefined4 *)(param_1 + 4);
uVar1 = *(undefined4 *)param_1;
fVar6 = local_100 - 10000.0;
do {
local_100 = local_100 + 35.501;
local_88 = 1;
local_bc = 0;
local_b8 = 0;
local_b4 = fVar6 - local_100;
local_94 = 0;
local_98 = 0;
local_9c = 0;
local_8c = 0;
local_a4 = 0;
local_a8 = 0;
local_87 = local_b4 * local_b4 != 0.0;
local_ac = 0;
local_c4 = local_100;
local_cc = uVar1;
local_c8 = uVar5;
(**(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,0,0,true,-1.0);
}
if (local_39 == '\0') {
if ((local_44 == 1.0) || (35.5 <= local_100 - local_5c)) {
*param_2 = local_5c;
if (param_3 == (Vector *)0x0) {
uVar5 = 1;
}
else {
if (((-0.01 < local_58) && (local_58 < 0.01)) &&
((-0.01 < local_54 && (((local_54 < 0.01 && (-0.01 < local_50)) && (local_50 < 0.01))))
)) {
local_54 = 0.0;
local_50 = 1.0;
local_58 = 0.0;
}
uVar5 = 1;
*(float *)param_3 = local_58;
*(float *)(param_3 + 4) = local_54;
*(float *)(param_3 + 8) = local_50;
}
goto LAB_0073d09b;
}
local_100 = local_5c;
}
fVar6 = local_100;
if (100.0 <= local_100 - *(float *)(param_1 + 8)) {
*param_2 = 0.0;
if (param_3 != (Vector *)0x0) {
*(undefined4 *)param_3 = 0;
*(undefined4 *)(param_3 + 4) = 0;
*(undefined4 *)(param_3 + 8) = 0x3f800000;
}
uVar5 = 0;
LAB_0073d09b:
iVar2 = _DAT_0105db00;
if (((DAT_0105d158 == '\0') || (_DAT_0105d154 != 0)) &&
(iVar4 = ThreadGetCurrentId(), iVar2 == iVar4)) {
cVar3 = CVProfNode::ExitScope();
if (cVar3 != '\0') {
_DAT_0105d15c = (int *)_DAT_0105d15c[0x19];
}
DAT_0105d158 = _DAT_0105d15c == (int *)0x105d160;
}
if (local_e4 != 0) {
(**(code **)(local_e4 + 0x54))(local_e4,local_ec,local_e8,0,0,0);
}
return uVar5;
}
} while( true );
}
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.