summaryrefslogtreecommitdiff
path: root/game/network/rail.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'game/network/rail.cpp')
-rw-r--r--game/network/rail.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/game/network/rail.cpp b/game/network/rail.cpp
index 176a704..34cbceb 100644
--- a/game/network/rail.cpp
+++ b/game/network/rail.cpp
@@ -45,8 +45,8 @@ RailLinks::addLinksBetween(GlobalPosition3D start, GlobalPosition3D end)
const float dir2 = pi + findNodeDirection(node2ins.first);
if (const auto radii = find_arcs_radius(flatStart, dir, flatEnd, dir2); radii.first < radii.second) {
const auto radius {radii.first};
- const auto c1 = flatStart + GlobalPosition2D(sincosf(dir + half_pi) * radius);
- const auto c2 = flatEnd + GlobalPosition2D(sincosf(dir2 + half_pi) * radius);
+ const auto c1 = flatStart + (sincosf(dir + half_pi) * radius);
+ const auto c2 = flatEnd + (sincosf(dir2 + half_pi) * radius);
const auto mid = (c1 + c2) / 2;
const auto midh = mid || midheight(mid);
addLink<RailLinkCurve>(start, midh, c1);
@@ -54,8 +54,8 @@ RailLinks::addLinksBetween(GlobalPosition3D start, GlobalPosition3D end)
}
else {
const auto radius {radii.second};
- const auto c1 = flatStart + GlobalPosition2D(sincosf(dir - half_pi) * radius);
- const auto c2 = flatEnd + GlobalPosition2D(sincosf(dir2 - half_pi) * radius);
+ const auto c1 = flatStart + (sincosf(dir - half_pi) * radius);
+ const auto c2 = flatEnd + (sincosf(dir2 - half_pi) * radius);
const auto mid = (c1 + c2) / 2;
const auto midh = mid || midheight(mid);
addLink<RailLinkCurve>(midh, start, c1);