summaryrefslogtreecommitdiff
path: root/game/geoData.cpp
diff options
context:
space:
mode:
authorDan Goodliffe <dan@randomdan.homeip.net>2024-12-23 13:42:39 +0000
committerDan Goodliffe <dan@randomdan.homeip.net>2024-12-23 13:42:39 +0000
commit9310329401d47de713f19aa3dcc5f6f12f22ea59 (patch)
treea94a118b0582e4ade398ae1b6f9d9ad6f11028b7 /game/geoData.cpp
parentUse correct triangle when creating surface boundary ends (diff)
downloadilt-9310329401d47de713f19aa3dcc5f6f12f22ea59.tar.bz2
ilt-9310329401d47de713f19aa3dcc5f6f12f22ea59.tar.xz
ilt-9310329401d47de713f19aa3dcc5f6f12f22ea59.zip
Copy properties when split faces and edges
Diffstat (limited to 'game/geoData.cpp')
-rw-r--r--game/geoData.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/game/geoData.cpp b/game/geoData.cpp
index 9516a95..d01b4d5 100644
--- a/game/geoData.cpp
+++ b/game/geoData.cpp
@@ -468,10 +468,10 @@ GeoData::setHeights(const std::span<const GlobalPosition3D> triangleStrip, const
if (!inter) {
throw std::runtime_error("Perpendicular lines do not cross");
}
- return split(edge_handle(nearest.first), *inter || tsPoint.z);
+ return split_copy(edge_handle(nearest.first), *inter || tsPoint.z);
}
// Nothing close, split face
- return split(face, tsPoint);
+ return split_copy(face, tsPoint);
};
// New vertices for each vertex in triangleStrip
@@ -524,7 +524,7 @@ GeoData::setHeights(const std::span<const GlobalPosition3D> triangleStrip, const
return true;
}
else {
- start = split(edge_handle(next), positionOnTriangle(*intersection, triangle));
+ start = split_copy(edge_handle(next), positionOnTriangle(*intersection, triangle));
}
addVertexForNormalUpdate(start);
boundaryTriangles.emplace(start, &triangle);