@@ -40,12 +40,20 @@ enum VehicleRailFlags {
VRF_TOGGLE_REVERSE = 7,
/* used to mark a train that can't get a path reservation */
VRF_TRAIN_STUCK = 8,
};
/** Modes for ignoring signals. */
enum TrainForceProceeding {
TFP_NONE = 0, ///< Normal operation.
TFP_STUCK = 1, ///< Proceed till next signal, but ignore being stuck till then. This includes force leaving depots.
TFP_SIGNAL = 2, ///< Ignore next signal, after the signal ignore being stucked.
typedef SimpleTinyEnumT<TrainForceProceeding, byte> TrainForceProceedingByte;
byte FreightWagonMult(CargoID cargo);
void CheckTrainsLengths();
void FreeTrainTrackReservation(const Train *v, TileIndex origin = INVALID_TILE, Trackdir orig_td = INVALID_TRACKDIR);
bool TryPathReserve(Train *v, bool mark_as_stuck = false, bool first_tile_okay = false);
@@ -91,13 +99,13 @@ struct Train : public GroundVehicle<Trai
Train *other_multiheaded_part;
uint16 crash_anim_pos;
uint16 flags;
TrackBitsByte track;
byte force_proceed;
TrainForceProceedingByte force_proceed;
RailTypeByte railtype;
RailTypes compatible_railtypes;
/** Ticks waiting in front of a signal, ticks being stuck or a counter for forced proceeding through signals. */
uint16 wait_counter;