Add road vehicle flags for whether any part is on level crossing

This commit is contained in:
Jonathan G Rennison
2023-09-10 13:43:13 +01:00
parent 18a40df10e
commit c6ce9ce687
8 changed files with 32 additions and 0 deletions

View File

@@ -132,6 +132,10 @@ struct RoadVehPathCache {
}
};
enum RoadVehicleFlags {
RVF_ON_LEVEL_CROSSING = 0, ///< One or more parts of this road vehicle are on a level crossing
};
/**
* Buses, trucks and trams belong to this class.
*/
@@ -150,6 +154,8 @@ struct RoadVehicle FINAL : public GroundVehicle<RoadVehicle, VEH_ROAD> {
byte critical_breakdown_count; ///< Counter for the number of critical breakdowns since last service
uint8 rvflags; ///< Road vehicle flags
/** We don't want GCC to zero our struct! It already is zeroed and has an index! */
RoadVehicle() : GroundVehicleBase() {}
/** We want to 'destruct' the right class. */