From 4667af751eb33edfd88204da8353ba4cf76592a8 Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Thu, 6 Feb 2025 19:11:49 +0000 Subject: Update PointFace _face cache as required instead of erroring --- game/geoData.cpp | 7 ++----- 1 file 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 -- cgit v1.2.3