summaryrefslogtreecommitdiff
path: root/game/network/rail.cpp
diff options
context:
space:
mode:
authorDan Goodliffe <dan@randomdan.homeip.net>2021-02-14 13:35:52 +0000
committerDan Goodliffe <dan@randomdan.homeip.net>2021-02-14 13:35:52 +0000
commit95e45557ba76132d7b7e8326bccd08a50f81eb0e (patch)
tree12e185af5ba4ce9a7ec04ce27c2e85ab286ff1ea /game/network/rail.cpp
parentDon't copy shared_ptrs (diff)
downloadilt-95e45557ba76132d7b7e8326bccd08a50f81eb0e.tar.bz2
ilt-95e45557ba76132d7b7e8326bccd08a50f81eb0e.tar.xz
ilt-95e45557ba76132d7b7e8326bccd08a50f81eb0e.zip
Rename flat_angle to vector_yaw
Diffstat (limited to 'game/network/rail.cpp')
-rw-r--r--game/network/rail.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/game/network/rail.cpp b/game/network/rail.cpp
index c926ced..7c045ad 100644
--- a/game/network/rail.cpp
+++ b/game/network/rail.cpp
@@ -80,7 +80,7 @@ round_sleepers(const float v)
RailLinkStraight::RailLinkStraight(const NodePtr & a, const NodePtr & b) : RailLinkStraight(a, b, b->pos - a->pos) { }
RailLinkStraight::RailLinkStraight(NodePtr a, NodePtr b, const glm::vec3 & diff) :
- RailLink({std::move(a), flat_angle(diff)}, {std::move(b), flat_angle(-diff)}, glm::length(diff))
+ RailLink({std::move(a), vector_yaw(diff)}, {std::move(b), vector_yaw(-diff)}, glm::length(diff))
{
vertices.reserve(2 * railCrossSection.size());
indices.reserve(2 * railCrossSection.size());
@@ -102,7 +102,7 @@ RailLinkStraight::positionAt(float dist, unsigned char start) const
const auto es {std::make_pair(ends[start].first.get(), ends[1 - start].first.get())};
const auto diff {es.second->pos - es.first->pos};
const auto dir {glm::normalize(diff)};
- return Transform {es.first->pos + dir * dist, {0, flat_angle(diff) /*, std::atan2(diff.x, -diff.z)*/, 0}};
+ return Transform {es.first->pos + dir * dist, {0, vector_yaw(diff) /*, std::atan2(diff.x, -diff.z)*/, 0}};
}
RailLinkCurve::RailLinkCurve(const NodePtr & a, const NodePtr & b, glm::vec2 c) :