diff options
Diffstat (limited to 'ui/editNetwork.cpp')
-rw-r--r-- | ui/editNetwork.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/ui/editNetwork.cpp b/ui/editNetwork.cpp index cab13f2..98a60d3 100644 --- a/ui/editNetwork.cpp +++ b/ui/editNetwork.cpp @@ -21,7 +21,8 @@ EditNetwork::click(const SDL_MouseButtonEvent & event, const Ray<GlobalPosition3 } else { if (const auto def = resolveRay(ray)) { - candidates = network->create(CreationDefinition {.fromEnd = *currentStart, .toEnd = *def}); + candidates = network->create( + gameState->terrain.get(), CreationDefinition {.fromEnd = *currentStart, .toEnd = *def}); for (const auto & link : candidates) { network->add(gameState->terrain.get(), link); } @@ -46,7 +47,8 @@ EditNetwork::move(const SDL_MouseMotionEvent &, const Ray<GlobalPosition3D> & ra { if (currentStart) { if (const auto def = resolveRay(ray)) { - candidates = network->create(CreationDefinition {.fromEnd = *currentStart, .toEnd = *def}); + candidates = network->create( + gameState->terrain.get(), CreationDefinition {.fromEnd = *currentStart, .toEnd = *def}); } } return false; |