summaryrefslogtreecommitdiff
path: root/game
diff options
context:
space:
mode:
authorDan Goodliffe <dan@randomdan.homeip.net>2025-02-06 19:11:49 +0000
committerDan Goodliffe <dan@randomdan.homeip.net>2025-02-06 19:11:49 +0000
commit4667af751eb33edfd88204da8353ba4cf76592a8 (patch)
tree907d06bc2eff4d217a58bcda572285f36cd281fa /game
parentCheck all adjacent vertex before edges when cutting triangle strip edge (diff)
downloadilt-4667af751eb33edfd88204da8353ba4cf76592a8.tar.bz2
ilt-4667af751eb33edfd88204da8353ba4cf76592a8.tar.xz
ilt-4667af751eb33edfd88204da8353ba4cf76592a8.zip
Update PointFace _face cache as required instead of erroring
Diffstat (limited to 'game')
-rw-r--r--game/geoData.cpp7
1 files changed, 2 insertions, 5 deletions
diff --git a/game/geoData.cpp b/game/geoData.cpp
index 22f8682..5f098e4 100644
--- a/game/geoData.cpp
+++ b/game/geoData.cpp
@@ -126,13 +126,10 @@ GeoData::PointFace::PointFace(const GlobalPosition2D p, const GeoData * mesh, Fa
GeoData::FaceHandle
GeoData::PointFace::face(const GeoData * mesh, FaceHandle start) const
{
- if (_face.is_valid()) {
- assert(mesh->triangleContainsPoint(point, _face));
+ if (_face.is_valid() && mesh->triangleContainsPoint(point, _face)) {
return _face;
}
- else {
- return (_face = mesh->findPoint(point, start));
- }
+ return (_face = mesh->findPoint(point, start));
}
GeoData::FaceHandle