(svn r24071) -Fix [FS#5093]: Reversing trains while they were entering or leaving a depot could lead to stuck trains.

This commit is contained in:
michi_cc
2012-03-25 23:42:49 +00:00
parent 1adb9a5c85
commit f8b62a3c7a
2 changed files with 4 additions and 1 deletions

View File

@@ -369,7 +369,8 @@ Train *GetTrainForReservation(TileIndex tile, Track track)
*/
bool IsSafeWaitingPosition(const Train *v, TileIndex tile, Trackdir trackdir, bool include_line_end, bool forbid_90deg)
{
if (IsRailDepotTile(tile)) return true;
/* A depot is safe if we enter it, but not when we exit. */
if (IsRailDepotTile(tile) && TrackdirToExitdir(trackdir) != GetRailDepotDirection(tile)) return true;
if (IsTileType(tile, MP_RAILWAY)) {
/* For non-pbs signals, stop on the signal tile. */