From 789a16e4e97d4050bb8db9cc3aebb01e807ac8c7 Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Wed, 10 Mar 2021 01:54:40 +0000 Subject: Push more RailLinks logic down into NetworkOf --- game/network/rail.cpp | 18 ------------------ 1 file changed, 18 deletions(-) (limited to 'game/network/rail.cpp') diff --git a/game/network/rail.cpp b/game/network/rail.cpp index 7cc6284..0ef58d7 100644 --- a/game/network/rail.cpp +++ b/game/network/rail.cpp @@ -7,7 +7,6 @@ #include // IWYU pragma: keep #include #include -#include #include #include #include @@ -22,23 +21,6 @@ constexpr glm::vec3 RAIL_HEIGHT {0, .25F, 0}; RailLinks::RailLinks() : NetworkOf {"rails.jpg"} { } void RailLinks::tick(TickDuration) { } -void -RailLinks::joinLinks(const LinkPtr & l) const -{ - for (const auto & ol : links.objects) { - if (l != ol) { - for (const auto oe : {0, 1}) { - for (const auto te : {0, 1}) { - if (l->ends[te].node == ol->ends[oe].node) { - l->ends[te].nexts.emplace_back(ol, oe); - ol->ends[oe].nexts.emplace_back(l, te); - } - } - } - } - } -} - std::shared_ptr RailLinks::addLinksBetween(glm::vec3 start, glm::vec3 end) { -- cgit v1.2.3