diff options
author | Dan Goodliffe <dan@randomdan.homeip.net> | 2025-05-11 00:12:42 +0100 |
---|---|---|
committer | Dan Goodliffe <dan@randomdan.homeip.net> | 2025-05-11 00:12:42 +0100 |
commit | 1bcce010b5b11b485ba80df58c984277100dc99e (patch) | |
tree | 857b8d3f095e6e32e75656eb4560dd795ac9b2ca /game/network/network.impl.h | |
parent | Set terrain height and surface when adding link (diff) | |
download | ilt-1bcce010b5b11b485ba80df58c984277100dc99e.tar.bz2 ilt-1bcce010b5b11b485ba80df58c984277100dc99e.tar.xz ilt-1bcce010b5b11b485ba80df58c984277100dc99e.zip |
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.
Diffstat (limited to 'game/network/network.impl.h')
-rw-r--r-- | game/network/network.impl.h | 7 |
1 files changed, 7 insertions, 0 deletions
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 @@ -161,6 +161,13 @@ NetworkOf<T, Links...>::create(const GenCurveDef & def) } template<typename T, typename... Links> +bool +NetworkOf<T, Links...>::anyLinks() const +{ + return !(static_cast<const NetworkLinkHolder<Links> *>(this)->vertices.empty() && ...); +} + +template<typename T, typename... Links> void NetworkOf<T, Links...>::add(GeoData * geoData, const Link::Ptr & link) { |