From dd80098076cda9c103b44356ca07c2c8bc7698d7 Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Sun, 14 Feb 2021 13:14:32 +0000 Subject: Join links in rail graph --- game/network/rail.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'game/network/rail.h') diff --git a/game/network/rail.h b/game/network/rail.h index 5fea713..a501f32 100644 --- a/game/network/rail.h +++ b/game/network/rail.h @@ -61,7 +61,9 @@ public: { const auto node1 = *nodes.insert(std::make_shared(a)).first; const auto node2 = *nodes.insert(std::make_shared(b)).first; - return links.create(node1, node2, std::forward(params)...); + auto l = links.create(node1, node2, std::forward(params)...); + joinLinks(l); + return l; } private: @@ -70,6 +72,7 @@ private: Nodes nodes; void render(const Shader &) const override; void tick(TickDuration elapsed) override; + void joinLinks(LinkPtr) const; std::shared_ptr texture; }; -- cgit v1.2.3