summaryrefslogtreecommitdiff
path: root/game/vehicles
diff options
context:
space:
mode:
authorDan Goodliffe <dan@randomdan.homeip.net>2023-11-25 14:32:56 +0000
committerDan Goodliffe <dan@randomdan.homeip.net>2023-11-25 14:32:56 +0000
commit3200eb41d60595813dca751fe15193ba0b44dddf (patch)
tree064232efc8c72cfc8e7c723eec0d8438e561748a /game/vehicles
parentSend position and rotation matrix to GPU separately in shadowmapper dynamic (diff)
downloadilt-3200eb41d60595813dca751fe15193ba0b44dddf.tar.bz2
ilt-3200eb41d60595813dca751fe15193ba0b44dddf.tar.xz
ilt-3200eb41d60595813dca751fe15193ba0b44dddf.zip
Remove getTransform
Diffstat (limited to 'game/vehicles')
-rw-r--r--game/vehicles/railVehicle.cpp18
1 files changed, 9 insertions, 9 deletions
diff --git a/game/vehicles/railVehicle.cpp b/game/vehicles/railVehicle.cpp
index 26536f5..bee0dd0 100644
--- a/game/vehicles/railVehicle.cpp
+++ b/game/vehicles/railVehicle.cpp
@@ -49,16 +49,16 @@ RailVehicle::intersectRay(const Ray & ray, Position2D * baryPos, float * distanc
constexpr const auto X = 1350.F;
const auto Y = this->rvClass->length / 2.F;
constexpr const auto Z = 3900.F;
- const auto moveBy = location.getTransform();
+ const auto moveBy = location.getRotationTransform();
const std::array<Position3D, 8> cornerVertices {{
- 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
+ location.position() + (moveBy * glm::vec4 {-X, Y, 0, 1}).xyz(), // LFB
+ location.position() + (moveBy * glm::vec4 {X, Y, 0, 1}).xyz(), // RFB
+ location.position() + (moveBy * glm::vec4 {-X, Y, Z, 1}).xyz(), // LFT
+ location.position() + (moveBy * glm::vec4 {X, Y, Z, 1}).xyz(), // RFT
+ location.position() + (moveBy * glm::vec4 {-X, -Y, 0, 1}).xyz(), // LBB
+ location.position() + (moveBy * glm::vec4 {X, -Y, 0, 1}).xyz(), // RBB
+ location.position() + (moveBy * glm::vec4 {-X, -Y, Z, 1}).xyz(), // LBT
+ location.position() + (moveBy * glm::vec4 {X, -Y, Z, 1}).xyz(), // RBT
}};
static constexpr const std::array<glm::vec<3, uint8_t>, 10> triangles {{
// Front