From 22aebcea74e1690fcf09d71b998d4de941e5b203 Mon Sep 17 00:00:00 2001 From: elsid Date: Tue, 4 May 2021 02:17:40 +0200 Subject: [PATCH] Remove useless rcMarkWalkableTriangles call It fills areas.data with walkable triangles but right after it's overwritten and rcClearUnwalkableTriangles is called instead that fills areas.data with unwalkable triangles. --- components/detournavigator/makenavmesh.cpp | 17 ----------------- 1 file changed, 17 deletions(-) diff --git a/components/detournavigator/makenavmesh.cpp b/components/detournavigator/makenavmesh.cpp index 9701b4950..c4abddf29 100644 --- a/components/detournavigator/makenavmesh.cpp +++ b/components/detournavigator/makenavmesh.cpp @@ -189,23 +189,6 @@ namespace { const auto chunk = chunkyMesh.getChunk(cid); - std::fill( - areas.begin(), - std::min(areas.begin() + static_cast(chunk.mSize), - areas.end()), - AreaType_null - ); - - rcMarkWalkableTriangles( - &context, - config.walkableSlopeAngle, - recastMesh.getVertices().data(), - static_cast(recastMesh.getVerticesCount()), - chunk.mIndices, - static_cast(chunk.mSize), - areas.data() - ); - for (std::size_t i = 0; i < chunk.mSize; ++i) areas[i] = chunk.mAreaTypes[i];