summaryrefslogtreecommitdiff
path: root/game/network/rail.cpp
diff options
context:
space:
mode:
authorDan Goodliffe <dan@randomdan.homeip.net>2022-10-13 20:27:46 +0100
committerDan Goodliffe <dan@randomdan.homeip.net>2022-10-13 20:27:46 +0100
commitfab2d34959c52383f6be3cb6634c6776b41f62a8 (patch)
treecbf8f4b717d50af882689b5e012c2e3737f44077 /game/network/rail.cpp
parentInheritable of standard typedefs (diff)
downloadilt-fab2d34959c52383f6be3cb6634c6776b41f62a8.tar.bz2
ilt-fab2d34959c52383f6be3cb6634c6776b41f62a8.tar.xz
ilt-fab2d34959c52383f6be3cb6634c6776b41f62a8.zip
Standard typedefs for Node
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 73ab3bf..5fec7c1 100644
--- a/game/network/rail.cpp
+++ b/game/network/rail.cpp
@@ -128,9 +128,9 @@ round_sleepers(const float v)
return round_frac(v, sleepers);
}
-RailLinkStraight::RailLinkStraight(const NodePtr & a, const NodePtr & b) : RailLinkStraight(a, b, b->pos - a->pos) { }
+RailLinkStraight::RailLinkStraight(const Node::Ptr & a, const Node::Ptr & b) : RailLinkStraight(a, b, b->pos - a->pos) { }
-RailLinkStraight::RailLinkStraight(NodePtr a, NodePtr b, const glm::vec3 & diff) :
+RailLinkStraight::RailLinkStraight(Node::Ptr a, Node::Ptr b, const glm::vec3 & diff) :
Link({std::move(a), vector_yaw(diff)}, {std::move(b), vector_yaw(-diff)}, glm::length(diff))
{
if (glGenVertexArrays) {
@@ -149,12 +149,12 @@ RailLinkStraight::RailLinkStraight(NodePtr a, NodePtr b, const glm::vec3 & diff)
}
}
-RailLinkCurve::RailLinkCurve(const NodePtr & a, const NodePtr & b, glm::vec2 c) :
+RailLinkCurve::RailLinkCurve(const Node::Ptr & a, const Node::Ptr & b, glm::vec2 c) :
RailLinkCurve(a, b, c ^ a->pos.z, {!c, a->pos, b->pos})
{
}
-RailLinkCurve::RailLinkCurve(const NodePtr & a, const NodePtr & b, glm::vec3 c, const Arc arc) :
+RailLinkCurve::RailLinkCurve(const Node::Ptr & a, const Node::Ptr & b, glm::vec3 c, const Arc arc) :
Link({a, normalize(arc.first + half_pi)}, {b, normalize(arc.second - half_pi)},
(glm::length(a->pos - c)) * arc_length(arc)),
LinkCurve {c, glm::length(ends[0].node->pos - c), arc}