From acd16970bc93712e7c8c3996816242a04999818b Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Sat, 6 Mar 2021 18:53:22 +0000 Subject: Introduce the Train concept as a literal collection of rail vehicles --- game/vehicles/vehicle.h | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'game/vehicles/vehicle.h') diff --git a/game/vehicles/vehicle.h b/game/vehicles/vehicle.h index a511d3c..89a6901 100644 --- a/game/vehicles/vehicle.h +++ b/game/vehicles/vehicle.h @@ -4,11 +4,12 @@ #include #include #include -#include #include #include #include +class Location; + class LinkHistory { public: using WEntry = std::pair; @@ -25,10 +26,10 @@ private: class Vehicle : public WorldObject, public Renderable { public: explicit Vehicle(const LinkPtr & link, float linkDist = 0); - float linkDist; // distance long current link + float linkDist; // distance along current link float speed {50}; // speed in m/s (~75 km/h) - Location location; + [[nodiscard]] virtual const Location & getLocation() const = 0; protected: LinkHistory linkHist; -- cgit v1.2.3