diff options
author | Dan Goodliffe <dan@randomdan.homeip.net> | 2025-05-12 00:23:42 +0100 |
---|---|---|
committer | Dan Goodliffe <dan@randomdan.homeip.net> | 2025-05-12 00:23:42 +0100 |
commit | b3105c56c277f6e1e27a3e5e5ee5e1b6c3f47afd (patch) | |
tree | 2f136cb121ef5aa5a78267ccbfa220ca87b56aac /application | |
parent | Split definition creation from link creation (diff) | |
download | ilt-b3105c56c277f6e1e27a3e5e5ee5e1b6c3f47afd.tar.bz2 ilt-b3105c56c277f6e1e27a3e5e5ee5e1b6c3f47afd.tar.xz ilt-b3105c56c277f6e1e27a3e5e5ee5e1b6c3f47afd.zip |
Split link generation definitions according to terrain
Copies the same imperfect logic from old link addition functions.
Diffstat (limited to 'application')
-rw-r--r-- | application/main.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
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<Angle> 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); } |