From d240fc840ebe35499e09c48960d4d89ce25c2824 Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Wed, 10 Mar 2021 01:20:08 +0000 Subject: Add some more helpers to Network --- game/network/rail.h | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'game/network/rail.h') 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 #include #include -#include #include #include @@ -60,8 +59,7 @@ public: std::shared_ptr addLink(glm::vec3 a, glm::vec3 b, Params &&... params) { - const auto node1 = *nodes.insert(std::make_shared(a)).first; - const auto node2 = *nodes.insert(std::make_shared(b)).first; + const auto node1 = nodeAt(a), node2 = nodeAt(b); auto l {links.create(node1, node2, std::forward(params)...)}; joinLinks(l); return l; -- cgit v1.2.3