summaryrefslogtreecommitdiff
path: root/game/geoData.cpp
diff options
context:
space:
mode:
authorDan Goodliffe <dan@randomdan.homeip.net>2024-12-23 13:55:29 +0000
committerDan Goodliffe <dan@randomdan.homeip.net>2024-12-23 13:55:29 +0000
commitb410b2e37b91d9bb39eeb98af45d603b74281be2 (patch)
tree313120ab56a5df55639d4970d11f56c397ecffe9 /game/geoData.cpp
parentCopy properties when split faces and edges (diff)
downloadilt-b410b2e37b91d9bb39eeb98af45d603b74281be2.tar.bz2
ilt-b410b2e37b91d9bb39eeb98af45d603b74281be2.tar.xz
ilt-b410b2e37b91d9bb39eeb98af45d603b74281be2.zip
Set surface from all triangles, not just the first
First may already have a surface in the case of a join
Diffstat (limited to 'game/geoData.cpp')
-rw-r--r--game/geoData.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/game/geoData.cpp b/game/geoData.cpp
index d01b4d5..fb3cb15 100644
--- a/game/geoData.cpp
+++ b/game/geoData.cpp
@@ -600,7 +600,9 @@ GeoData::setHeights(const std::span<const GlobalPosition3D> triangleStrip, const
});
}
};
- surfaceStripWalk(surfaceStripWalk, findPoint(strip.front().centroid()));
+ for (const auto & triangle : strip) {
+ surfaceStripWalk(surfaceStripWalk, findPoint(triangle.centroid()));
+ }
updateAllVertexNormals(newOrChangedVerts);
generation++;