Changeset - r15494:e551f7b7e29e
[Not reviewed]
master
0 1 0
michi_cc - 14 years ago 2010-07-15 19:15:21
michi_cc@openttd.org
(svn r20156) -Fix [FS#3937]: [YAPP] Converting a one-way block to a path signal with trains on both sides could lead to a train crash.
1 file changed with 4 insertions and 0 deletions:
0 comments (0 inline, 0 general)
src/pbs.cpp
Show inline comments
 
@@ -314,6 +314,10 @@ Train *GetTrainForReservation(TileIndex 
 
	 * have a train on it. We need FollowReservation to ignore one-way signals
 
	 * here, as one of the two search directions will be the "wrong" way. */
 
	for (int i = 0; i < 2; ++i, trackdir = ReverseTrackdir(trackdir)) {
 
		/* If the tile has a one-way block signal in the current trackdir, skip the
 
		 * search in this direction as the reservation can't come from this side.*/
 
		if (HasOnewaySignalBlockingTrackdir(tile, ReverseTrackdir(trackdir)) && !HasPbsSignalOnTrackdir(tile, trackdir)) continue;
 

	
 
		FindTrainOnTrackInfo ftoti;
 
		ftoti.res = FollowReservation(GetTileOwner(tile), rts, tile, trackdir, true);
 

	
0 comments (0 inline, 0 general)