diff options
Diffstat (limited to 'game/network/rail.h')
-rw-r--r-- | game/network/rail.h | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/game/network/rail.h b/game/network/rail.h index c67dc67..3b3da42 100644 --- a/game/network/rail.h +++ b/game/network/rail.h @@ -10,7 +10,6 @@ #include <location.hpp> #include <maths.h> #include <memory> -#include <set> #include <span> #include <utility> @@ -60,8 +59,7 @@ public: std::shared_ptr<T> addLink(glm::vec3 a, glm::vec3 b, Params &&... params) { - const auto node1 = *nodes.insert(std::make_shared<Node>(a)).first; - const auto node2 = *nodes.insert(std::make_shared<Node>(b)).first; + const auto node1 = nodeAt(a), node2 = nodeAt(b); auto l {links.create<T>(node1, node2, std::forward<Params>(params)...)}; joinLinks(l); return l; |