From 955787485b098d51a393614cb9cfb7edd1c48bed Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Sat, 22 Oct 2022 19:08:24 +0100 Subject: Rename shadowing variable --- game/vehicles/railVehicle.cpp | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/game/vehicles/railVehicle.cpp b/game/vehicles/railVehicle.cpp index ec12674..fb42a28 100644 --- a/game/vehicles/railVehicle.cpp +++ b/game/vehicles/railVehicle.cpp @@ -35,16 +35,16 @@ RailVehicle::intersectRay(const Ray & ray, glm::vec2 * baryPos, float * distance constexpr const auto X = 1.35F; const auto Y = this->rvClass->length / 2.F; constexpr const auto Z = 3.9F; - const auto move = glm::translate(location.pos) * rotate_ypr(location.rot); + const auto moveBy = glm::translate(location.pos) * rotate_ypr(location.rot); const std::array cornerVertices {{ - move * glm::vec4 {-X, Y, 0, 1}, // LFB - move * glm::vec4 {X, Y, 0, 1}, // RFB - move * glm::vec4 {-X, Y, Z, 1}, // LFT - move * glm::vec4 {X, Y, Z, 1}, // RFT - move * glm::vec4 {-X, -Y, 0, 1}, // LBB - move * glm::vec4 {X, -Y, 0, 1}, // RBB - move * glm::vec4 {-X, -Y, Z, 1}, // LBT - move * glm::vec4 {X, -Y, Z, 1}, // RBT + moveBy * glm::vec4 {-X, Y, 0, 1}, // LFB + moveBy * glm::vec4 {X, Y, 0, 1}, // RFB + moveBy * glm::vec4 {-X, Y, Z, 1}, // LFT + moveBy * glm::vec4 {X, Y, Z, 1}, // RFT + moveBy * glm::vec4 {-X, -Y, 0, 1}, // LBB + moveBy * glm::vec4 {X, -Y, 0, 1}, // RBB + moveBy * glm::vec4 {-X, -Y, Z, 1}, // LBT + moveBy * glm::vec4 {X, -Y, Z, 1}, // RBT }}; static constexpr const std::array triangles {{ // Front -- cgit v1.2.3