diff options
author | Dan Goodliffe <dan@randomdan.homeip.net> | 2021-03-07 19:02:24 +0000 |
---|---|---|
committer | Dan Goodliffe <dan@randomdan.homeip.net> | 2021-03-07 19:02:24 +0000 |
commit | e69a0c558bf591526a2ae3ced00bb108ae1a5608 (patch) | |
tree | c5d92cbf69fad6f993a23685f67494893e4c0fbd | |
parent | Speed conversions and literals (diff) | |
download | ilt-e69a0c558bf591526a2ae3ced00bb108ae1a5608.tar.bz2 ilt-e69a0c558bf591526a2ae3ced00bb108ae1a5608.tar.xz ilt-e69a0c558bf591526a2ae3ced00bb108ae1a5608.zip |
Add maxSpeed to rail vehicle class
-rw-r--r-- | game/vehicles/railVehicleClass.cpp | 4 | ||||
-rw-r--r-- | game/vehicles/railVehicleClass.h | 1 |
2 files changed, 4 insertions, 1 deletions
diff --git a/game/vehicles/railVehicleClass.cpp b/game/vehicles/railVehicleClass.cpp index 71890b8..83eb9a0 100644 --- a/game/vehicles/railVehicleClass.cpp +++ b/game/vehicles/railVehicleClass.cpp @@ -12,6 +12,7 @@ #include <lib/resource.h> #include <location.hpp> #include <map> +#include <maths.h> #include <memory> #include <set> #include <string> @@ -24,7 +25,8 @@ RailVehicleClass::RailVehicleClass(const std::string & name) : { } -RailVehicleClass::RailVehicleClass(std::unique_ptr<ObjParser> o, std::shared_ptr<Texture> t) : texture {std::move(t)} +RailVehicleClass::RailVehicleClass(std::unique_ptr<ObjParser> o, std::shared_ptr<Texture> t) : + texture {std::move(t)}, maxSpeed(95._mph) { wheelBase = bogieOffset(*o); length = objectLength(*o); diff --git a/game/vehicles/railVehicleClass.h b/game/vehicles/railVehicleClass.h index b902367..fb881b9 100644 --- a/game/vehicles/railVehicleClass.h +++ b/game/vehicles/railVehicleClass.h @@ -22,6 +22,7 @@ public: std::shared_ptr<Texture> texture; float wheelBase; float length; + float maxSpeed; private: RailVehicleClass(std::unique_ptr<ObjParser> obj, std::shared_ptr<Texture>); |