summaryrefslogtreecommitdiff
path: root/game/network/rail.h
diff options
context:
space:
mode:
authorDan Goodliffe <dan@randomdan.homeip.net>2021-03-10 01:20:08 +0000
committerDan Goodliffe <dan@randomdan.homeip.net>2021-03-10 01:20:08 +0000
commitd240fc840ebe35499e09c48960d4d89ce25c2824 (patch)
tree5a0423cd488e38bb8dc3e9ab4a81f8959ad95c73 /game/network/rail.h
parentVertices and indices vectors not required once mesh is created (diff)
downloadilt-d240fc840ebe35499e09c48960d4d89ce25c2824.tar.bz2
ilt-d240fc840ebe35499e09c48960d4d89ce25c2824.tar.xz
ilt-d240fc840ebe35499e09c48960d4d89ce25c2824.zip
Add some more helpers to Network
Diffstat (limited to 'game/network/rail.h')
-rw-r--r--game/network/rail.h4
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;