From 7d5c07b2e70426bbfd99984a237e2b518e364c78 Mon Sep 17 00:00:00 2001 From: Kawe Mazidjatari <48657826+Mauler125@users.noreply.github.com> Date: Fri, 19 Jul 2024 00:01:11 +0200 Subject: [PATCH] Recast: fix compiler warning and floor value Value of dtCalcLinkDistance has to be floored to match Titanfall 2 values. --- src/thirdparty/recast/Detour/Source/DetourNavMesh.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/thirdparty/recast/Detour/Source/DetourNavMesh.cpp b/src/thirdparty/recast/Detour/Source/DetourNavMesh.cpp index c30cdd9a..5d8d4960 100644 --- a/src/thirdparty/recast/Detour/Source/DetourNavMesh.cpp +++ b/src/thirdparty/recast/Detour/Source/DetourNavMesh.cpp @@ -1739,7 +1739,7 @@ dtStatus dtNavMesh::getPolyArea(dtPolyRef ref, unsigned char* resultArea) const unsigned char dtCalcLinkDistance(const float* spos, const float* epos) { - return (unsigned char)rdVdist(spos, epos) / DT_TRAVERSE_DIST_QUANT_FACTOR; + return (unsigned char)rdMathFloorf(rdVdist(spos, epos) / DT_TRAVERSE_DIST_QUANT_FACTOR); } float dtCalcPolySurfaceArea(const dtPoly* poly, const float* verts)