diff options
| author | Dan Goodliffe <dan@randomdan.homeip.net> | 2024-12-23 13:55:29 +0000 |
|---|---|---|
| committer | Dan Goodliffe <dan@randomdan.homeip.net> | 2024-12-23 13:55:29 +0000 |
| commit | b410b2e37b91d9bb39eeb98af45d603b74281be2 (patch) | |
| tree | 313120ab56a5df55639d4970d11f56c397ecffe9 /game | |
| parent | Copy properties when split faces and edges (diff) | |
| download | ilt-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')
| -rw-r--r-- | game/geoData.cpp | 4 |
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++; |
