summaryrefslogtreecommitdiff
path: root/game
diff options
context:
space:
mode:
Diffstat (limited to 'game')
-rw-r--r--game/network/network.h2
-rw-r--r--game/network/rail.cpp4
2 files changed, 3 insertions, 3 deletions
diff --git a/game/network/network.h b/game/network/network.h
index 02f8c30..8af06a9 100644
--- a/game/network/network.h
+++ b/game/network/network.h
@@ -16,7 +16,7 @@ class Texture;
class SceneShader;
class Ray;
-template<size_t... n> using GenDef = std::tuple<glm::vec<n, float>...>;
+template<size_t... n> using GenDef = std::tuple<glm::vec<n, Distance>...>;
using GenCurveDef = GenDef<3, 3, 2>;
class Network {
diff --git a/game/network/rail.cpp b/game/network/rail.cpp
index f46504b..cc61db9 100644
--- a/game/network/rail.cpp
+++ b/game/network/rail.cpp
@@ -133,7 +133,7 @@ RailLinkStraight::RailLinkStraight(Node::Ptr a, Node::Ptr b, const Position3D &
for (auto ei : {1U, 0U}) {
const auto trans {glm::translate(ends[ei].node->pos) * e};
for (const auto & rcs : railCrossSection) {
- const Position3D m {(trans * glm::vec4 {rcs.first, 1})};
+ const Position3D m {(trans * (rcs.first ^ 1))};
vertices.emplace_back(m, Position2D {rcs.second, len * static_cast<float>(ei)}, up);
}
}
@@ -166,7 +166,7 @@ RailLinkCurve::RailLinkCurve(const Node::Ptr & a, const Node::Ptr & b, Position3
const auto t {
trans * glm::rotate(half_pi - swing.x, up) * glm::translate(Position3D {radius, 0.F, swing.y})};
for (const auto & rcs : railCrossSection) {
- const Position3D m {(t * glm::vec4 {rcs.first, 1})};
+ const Position3D m {(t * (rcs.first ^ 1))};
vertices.emplace_back(m, Position2D {rcs.second, swing.z}, up);
}
}