(svn r11619) -Fix [FS#1531]: do not make crossing red behind depot the train is entering
authorsmatz
Tue, 11 Dec 2007 19:09:36 +0000
changeset 8058 5d32eaa21927
parent 8057 9a378e86100b
child 8059 0dbe702b7096
(svn r11619) -Fix [FS#1531]: do not make crossing red behind depot the train is entering
src/train_cmd.cpp
--- a/src/train_cmd.cpp	Tue Dec 11 17:44:55 2007 +0000
+++ b/src/train_cmd.cpp	Tue Dec 11 19:09:36 2007 +0000
@@ -3240,8 +3240,9 @@
 			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);