From 35dea720fc4c5f00322453f548677d39a966eae2 Mon Sep 17 00:00:00 2001 From: Andrew Gilewsky Date: Thu, 25 Apr 2024 23:19:34 +0100 Subject: [PATCH] Fixed incorrect span clamp. --- vnavmesh/NavmeshRasterizer.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vnavmesh/NavmeshRasterizer.cs b/vnavmesh/NavmeshRasterizer.cs index 9228159..765f110 100644 --- a/vnavmesh/NavmeshRasterizer.cs +++ b/vnavmesh/NavmeshRasterizer.cs @@ -266,7 +266,7 @@ public bool RasterizeMesh(SceneExtractor.Mesh mesh, SceneExtractor.MeshInstance if (y1 < 0 || y0 >= _maxY) continue; y0 = Math.Clamp(y0, 0, _maxY - 1); - y1 = Math.Clamp(y1, y0 + 1, _maxY - 1); + y1 = Math.Clamp(y1, y0, _maxY - 1); AddSpan(x, z, y0, y1, areaId, realSolid);