From b3105c56c277f6e1e27a3e5e5ee5e1b6c3f47afd Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Mon, 12 May 2025 00:23:42 +0100 Subject: Split link generation definitions according to terrain Copies the same imperfect logic from old link addition functions. --- application/main.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'application/main.cpp') diff --git a/application/main.cpp b/application/main.cpp index d96b188..3536cf7 100644 --- a/application/main.cpp +++ b/application/main.cpp @@ -64,10 +64,11 @@ public: Link::Ptr l3; for (std::optional previousDir; const auto [fromPos, toPos] : std::views::pairwise(nodes)) { - const auto links = railLinks->create({ - .fromEnd = {.position = fromPos, .direction = previousDir}, - .toEnd = {.position = toPos, .direction = std::nullopt}, - }); + const auto links = railLinks->create(gameState->terrain.get(), + { + .fromEnd = {.position = fromPos, .direction = previousDir}, + .toEnd = {.position = toPos, .direction = std::nullopt}, + }); for (const auto & link : links) { railLinks->add(terrain.get(), link); } -- cgit v1.2.3