From 1bcce010b5b11b485ba80df58c984277100dc99e Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Sun, 11 May 2025 00:12:42 +0100 Subject: Fix conditional render of rail links Tests for vertices, not links in network. Fixes case where links are present but not in network, e.g. currently being built. --- game/network/network.impl.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'game/network/network.impl.h') diff --git a/game/network/network.impl.h b/game/network/network.impl.h index 7f7dfb3..04c5d7c 100644 --- a/game/network/network.impl.h +++ b/game/network/network.impl.h @@ -160,6 +160,13 @@ NetworkOf::create(const GenCurveDef & def) *this, candidateNodeAt(std::get<0>(def)).first, candidateNodeAt(std::get<1>(def)).first, std::get<2>(def)); } +template +bool +NetworkOf::anyLinks() const +{ + return !(static_cast *>(this)->vertices.empty() && ...); +} + template void NetworkOf::add(GeoData * geoData, const Link::Ptr & link) -- cgit v1.2.3