From 35a9f035963458156c719dc16f4073b8244d66eb Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Sat, 20 Jan 2024 23:27:01 +0000 Subject: Pass curve link radius, no recalculate, its constant --- game/network/rail.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'game/network/rail.cpp') diff --git a/game/network/rail.cpp b/game/network/rail.cpp index 46c129b..b500006 100644 --- a/game/network/rail.cpp +++ b/game/network/rail.cpp @@ -156,7 +156,7 @@ RailLinkCurve::RailLinkCurve(NetworkLinkHolder & instances, const glm::length(RelativePosition3D(a->pos - c)) * arc_length(arc)), 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)} + half_pi - arc.first, half_pi - arc.second, radius)} { if (glGenVertexArrays) { const auto & e0p {ends[0].node->pos}; @@ -199,7 +199,7 @@ template<> NetworkLinkHolder::NetworkLinkHolder() VertexArrayObject {vao} .addAttribs(vertices.bufferName()); + &RailLinkCurve::Vertex::bangle, &RailLinkCurve::Vertex::radius>(vertices.bufferName()); } namespace { -- cgit v1.2.3