17
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-10-17 06:19:19 +02:00

fix(editor): a curve with a switch in it read as one curve through the main track of the switch, the switch placed into a curve on the part around the click; the diverging path of a switch placed into a canted curve lies on the conical surface of the cant along its whole length, not only at its ends; platforms by a switch keep the cant of the track for their height, the gauge of the other path only sets them back

This commit is contained in:
maj00r
2026-10-08 01:39:35 +02:00
parent ee3833fdba
commit a5ade3258f
5 changed files with 109 additions and 7 deletions

View File

@@ -657,10 +657,7 @@ void sweep_node::beside_switches(std::vector<sample> &Samples)
continue;
auto const needed{offset + total(*nearest)};
if (needed > total(here))
{
here.widening[side] = needed;
here.cant[side] = 0.0;
}
here.widening[side] = needed - std::max(0.0, here.cant[side]) * edgeheight / 1.5;
}
}
}