summaryrefslogtreecommitdiff
path: root/game/vehicles/railloco.cpp
diff options
context:
space:
mode:
authorDan Goodliffe <dan@randomdan.homeip.net>2021-02-20 14:06:29 +0000
committerDan Goodliffe <dan@randomdan.homeip.net>2021-02-20 14:06:29 +0000
commitb77024de4351bcddee5c4781aa9fc031131f293b (patch)
treec51d7c8add4c450a0b6e980da88830fa53215171 /game/vehicles/railloco.cpp
parentdos2unix shader sources (diff)
downloadilt-b77024de4351bcddee5c4781aa9fc031131f293b.tar.bz2
ilt-b77024de4351bcddee5c4781aa9fc031131f293b.tar.xz
ilt-b77024de4351bcddee5c4781aa9fc031131f293b.zip
Pass linters
Diffstat (limited to 'game/vehicles/railloco.cpp')
-rw-r--r--game/vehicles/railloco.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/game/vehicles/railloco.cpp b/game/vehicles/railloco.cpp
index b47722e..6a43965 100644
--- a/game/vehicles/railloco.cpp
+++ b/game/vehicles/railloco.cpp
@@ -6,7 +6,9 @@
#include <algorithm>
#include <array>
#include <cache.h>
+#include <filesystem>
#include <glm/glm.hpp>
+#include <iterator>
#include <lib/resource.h>
#include <maths.h>
#include <memory>
@@ -61,7 +63,7 @@ RailLoco::updateRailVehiclePosition(RailVehicle * w, float trailBy) const
{
const auto overhang {(w->length - w->wheelBase) / 2};
const auto & b1Pos = w->bogeys[0].location = getBogeyPosition(linkDist, trailBy += overhang);
- const auto & b2Pos = w->bogeys[1].location = getBogeyPosition(linkDist, trailBy += wheelBase);
+ const auto & b2Pos = w->bogeys[1].location = getBogeyPosition(linkDist, trailBy + wheelBase);
const auto diff = glm::normalize(b2Pos.GetPos() - b1Pos.GetPos());
w->location.GetPos() = (b1Pos.GetPos() + b2Pos.GetPos()) / 2.F;
w->location.GetRot() = {-vector_pitch(diff), vector_yaw(diff), 0};