summaryrefslogtreecommitdiff
path: root/game/network/rail.cpp
diff options
context:
space:
mode:
authorDan Goodliffe <dan@randomdan.homeip.net>2024-03-21 20:09:34 +0000
committerDan Goodliffe <dan@randomdan.homeip.net>2024-03-21 20:09:34 +0000
commit31f73b6f44f3deac749af41e84435f5bc9b037f2 (patch)
treee9de1a70be1256f1ad6929d52631f3e3b68f42a6 /game/network/rail.cpp
parentvector_yaw only needs 2 dimensions (diff)
downloadilt-31f73b6f44f3deac749af41e84435f5bc9b037f2.tar.bz2
ilt-31f73b6f44f3deac749af41e84435f5bc9b037f2.tar.xz
ilt-31f73b6f44f3deac749af41e84435f5bc9b037f2.zip
Make arc_length a member function
Diffstat (limited to 'game/network/rail.cpp')
-rw-r--r--game/network/rail.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/game/network/rail.cpp b/game/network/rail.cpp
index 34cbceb..e342224 100644
--- a/game/network/rail.cpp
+++ b/game/network/rail.cpp
@@ -118,7 +118,7 @@ RailLinkCurve::RailLinkCurve(
RailLinkCurve::RailLinkCurve(NetworkLinkHolder<RailLinkCurve> & instances, const Node::Ptr & a, const Node::Ptr & b,
GlobalPosition3D c, const Arc arc) :
Link({a, normalize(arc.first + half_pi)}, {b, normalize(arc.second - half_pi)},
- glm::length(RelativePosition3D(a->pos - c)) * arc_length(arc)),
+ glm::length(RelativePosition3D(a->pos - c)) * arc.length()),
LinkCurve {c, glm::length(RelativePosition3D(ends[0].node->pos - c)), arc},
instance {instances.vertices.acquire(ends[0].node->pos, ends[1].node->pos, c, round_sleepers(length / 2000.F),
half_pi - arc.first, half_pi - arc.second, radius)}