summaryrefslogtreecommitdiff
path: root/ui/builders/join.cpp
diff options
context:
space:
mode:
authorDan Goodliffe <dan@randomdan.homeip.net>2025-02-09 13:02:09 +0000
committerDan Goodliffe <dan@randomdan.homeip.net>2025-02-09 13:02:09 +0000
commit62fd9391bbfde47177fb36434d9664e47f4cf656 (patch)
tree83c1361b41bac431f8dbddb92859fb28e76455a5 /ui/builders/join.cpp
parentBig of validation on getSurface (diff)
downloadilt-62fd9391bbfde47177fb36434d9664e47f4cf656.tar.bz2
ilt-62fd9391bbfde47177fb36434d9664e47f4cf656.tar.xz
ilt-62fd9391bbfde47177fb36434d9664e47f4cf656.zip
Initial commit setting terrain during network construction
This is all in the wrong place, it shouldn't be part of the network interface.
Diffstat (limited to 'ui/builders/join.cpp')
-rw-r--r--ui/builders/join.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/ui/builders/join.cpp b/ui/builders/join.cpp
index ee14d63..6941e23 100644
--- a/ui/builders/join.cpp
+++ b/ui/builders/join.cpp
@@ -25,13 +25,13 @@ BuilderJoin::move(Network * network, const GeoData *, const SDL_MouseMotionEvent
void
BuilderJoin::click(
- Network * network, const GeoData *, const SDL_MouseButtonEvent & e, const Ray<GlobalPosition3D> & ray)
+ Network * network, const GeoData * geoData, const SDL_MouseButtonEvent & e, const Ray<GlobalPosition3D> & ray)
{
switch (e.button) {
case SDL_BUTTON_LEFT:
if (const auto p = network->intersectRayNodes(ray)) {
if (p1) {
- create(network, p1, p);
+ create(network, geoData, p1, p);
p1.reset();
candidateLinks.removeAll();
}
@@ -47,9 +47,9 @@ BuilderJoin::click(
}
Link::CCollection
-BuilderJoin::create(Network * network, const Node::Ptr & p1, const Node::Ptr & p2) const
+BuilderJoin::create(Network * network, const GeoData * geoData, const Node::Ptr & p1, const Node::Ptr & p2) const
{
- const auto links = network->addJoins(p1->pos, p2->pos);
+ const auto links = network->addJoins(geoData, p1->pos, p2->pos);
setHeightsFor(network, links);
return links;
}