Improve handling of conditional order waiting loops

Do not leave station/depot/waypoint at all if conditional order
loop would result in re-starting waiting/loading

Only actually leave and update timetable at end of loop

Rate-limit loop checks regardless of timetabled wait time
This commit is contained in:
Jonathan G Rennison
2022-01-19 00:09:55 +00:00
parent 904ff6757d
commit beb6d01fe8
5 changed files with 146 additions and 11 deletions

View File

@@ -63,6 +63,7 @@ enum VehicleFlags {
VF_TIMETABLE_SEPARATION = 14, ///< Whether timetable auto-separation is enabled
VF_AUTOMATE_TIMETABLE = 15, ///< Whether the vehicle should manage the timetable automatically.
VF_HAVE_SLOT = 16, ///< Vehicle has 1 or more slots
VF_COND_ORDER_WAIT = 17, ///< Vehicle is waiting due to conditional order loop
};
/** Bit numbers used to indicate which of the #NewGRFCache values are valid. */