Changeset - r8058:a53f0b6841e6
[Not reviewed]
master
0 1 0
smatz - 17 years ago 2007-12-11 19:09:36
smatz@openttd.org
(svn r11619) -Fix [FS#1531]: do not make crossing red behind depot the train is entering
1 file changed with 3 insertions and 2 deletions:
0 comments (0 inline, 0 general)
src/train_cmd.cpp
Show inline comments
 
@@ -3237,14 +3237,15 @@ static bool TrainCheckIfLineEnds(Vehicle
 
				GetRailDepotDirection(tile) == dir))) {
 
			v->cur_speed = 0;
 
			ReverseTrainDirection(v);
 
			return false;
 
		}
 
		if ((ts &= (ts >> 16)) == 0) {
 
			/* make a rail/road crossing red */
 
			if (IsLevelCrossingTile(tile)) {
 
			/* make a rail/road crossing red
 
			 * do not make crossing red behind depot the train is entering */
 
			if (IsLevelCrossingTile(tile) && (GetRailTileType(v->tile) != RAIL_TILE_DEPOT || GetRailDepotDirection(v->tile) == dir)) {
 
				if (!IsCrossingBarred(tile)) {
 
					BarCrossing(tile);
 
					SndPlayVehicleFx(SND_0E_LEVEL_CROSSING, v);
 
					MarkTileDirtyByTile(tile);
 
				}
 
			}
0 comments (0 inline, 0 general)