--- a/src/vehicle.h Wed Jun 13 11:45:14 2007 +0000
+++ b/src/vehicle.h Wed Jun 13 12:05:56 2007 +0000
@@ -8,6 +8,7 @@
#include "oldpool.h"
#include "order.h"
#include "rail.h"
+#include "road.h"
/** The returned bits of VehicleEnterTile. */
enum VehicleEnterTileStatus {
@@ -188,6 +189,11 @@
byte reverse_ctr;
struct RoadStop *slot;
byte slot_age;
+ EngineID first_engine;
+ byte cached_veh_length;
+
+ RoadType roadtype;
+ RoadTypes compatible_roadtypes;
};
struct VehicleSpecial {
@@ -395,6 +401,17 @@
* Play the sound associated with leaving the station
*/
virtual void PlayLeaveStationSound() const {}
+
+ /**
+ * Whether this is the primary vehicle in the chain.
+ */
+ virtual bool IsPrimaryVehicle() const { return false; }
+
+ /**
+ * Whether this vehicle understands the concept of a front engine, so
+ * basically, if GetFirstVehicleInChain() can be called for it.
+ */
+ virtual bool HasFront() const { return false; }
};
/**