From 8185a79abb71aa6ad0d3ca3719047372440291c4 Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Wed, 18 Dec 2024 16:03:47 +0000 Subject: Don't cut internal boundaries Existing terrain contains enough nodes, assumes input surface is flat. For non-flat requires, submit several surfaces. --- game/geoData.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/game/geoData.cpp b/game/geoData.cpp index 643b24b..8e662b3 100644 --- a/game/geoData.cpp +++ b/game/geoData.cpp @@ -537,12 +537,12 @@ GeoData::setHeights(const std::span triangleStrip, const } }; auto doBoundary = [&doBoundaryPart, triangle = strip.begin()](const auto & verts) mutable { - const auto & [a, b, c] = verts; - doBoundaryPart(a, b, *triangle); + const auto & [a, _, c] = verts; doBoundaryPart(a, c, *triangle); triangle++; }; std::ranges::for_each(newVerts | std::views::adjacent<3>, doBoundary); + doBoundaryPart(*++newVerts.begin(), newVerts.front(), *strip.rbegin()); doBoundaryPart(*++newVerts.rbegin(), newVerts.back(), *strip.rbegin()); std::set done; -- cgit v1.2.3