From 067ecf8d6dfc9ecf002d3cc92ce7d1574d095ddc Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Sun, 7 Jan 2024 17:29:21 +0000 Subject: Remove PositionxD from Network --- game/network/link.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'game/network/link.cpp') diff --git a/game/network/link.cpp b/game/network/link.cpp index dc9aecc..932fc67 100644 --- a/game/network/link.cpp +++ b/game/network/link.cpp @@ -63,12 +63,13 @@ LinkCurve::intersectRay(const Ray & ray) const const auto & e1p {ends[1].node->pos}; const auto slength = round_frac(length / 2.F, 5.F); const auto segs = std::round(15.F * slength / std::pow(radius, 0.7F)); - const auto step {Position2D {arc_length(arc), e1p.z - e0p.z} / segs}; + const auto step {glm::vec<2, RelativeDistance> {arc_length(arc), e1p.z - e0p.z} / segs}; auto segCount = static_cast(std::lround(segs)) + 1; std::vector points; points.reserve(segCount); - for (Position2D swing = {arc.first, centreBase.z - e0p.z}; segCount; swing += step, --segCount) { + for (std::remove_const_t swing = {arc.first, centreBase.z - e0p.z}; segCount; + swing += step, --segCount) { points.emplace_back(centreBase + GlobalPosition3D((sincosf(swing.x) * radius) || swing.y)); } return ray.passesCloseToEdges(points, 1.F); -- cgit v1.2.3