diff options
author | Dan Goodliffe <dan@randomdan.homeip.net> | 2023-05-07 01:41:31 +0100 |
---|---|---|
committer | Dan Goodliffe <dan@randomdan.homeip.net> | 2023-05-07 01:41:31 +0100 |
commit | 9ab2aad4aa00afe3373b3a779377fa049459fb4d (patch) | |
tree | 18bf013e3be660b0769cd1a601e670eb79355324 /game/vehicles/railVehicle.cpp | |
parent | Rename strings.h to something that won't conflict with a system header (diff) | |
parent | Templated BufferedLocation and single buffer storage for RVC locations (diff) | |
download | ilt-9ab2aad4aa00afe3373b3a779377fa049459fb4d.tar.bz2 ilt-9ab2aad4aa00afe3373b3a779377fa049459fb4d.tar.xz ilt-9ab2aad4aa00afe3373b3a779377fa049459fb4d.zip |
Merge branch 'containers'
Diffstat (limited to 'game/vehicles/railVehicle.cpp')
-rw-r--r-- | game/vehicles/railVehicle.cpp | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/game/vehicles/railVehicle.cpp b/game/vehicles/railVehicle.cpp index c4a9e96..2d820b6 100644 --- a/game/vehicles/railVehicle.cpp +++ b/game/vehicles/railVehicle.cpp @@ -12,13 +12,12 @@ #include <ray.h> RailVehicle::RailVehicle(RailVehicleClassPtr rvc) : - rvClass {std::move(rvc)}, location {rvClass->instancesBody}, bogies { - rvClass->instancesBogies.front(), - rvClass->instancesBogies.back(), - } + RailVehicleClass::Instance {rvc->instances.acquire()}, rvClass {std::move(rvc)}, location {&LV::body, *this}, + bogies {{ + {&LV::front, *this, glm::vec3 {0, rvClass->wheelBase / 2.F, 0}}, + {&LV::back, *this, glm::vec3 {0, -rvClass->wheelBase / 2.F, 0}}, + }} { - bogies.front().setPosition({0, rvClass->wheelBase / 2.F, 0}); - bogies.back().setPosition({0, -bogies.front().position().y, 0}); } void |