changeset 8058:1d706d4bf166 draft

(svn r11619) -Fix [FS#1531]: do not make crossing red behind depot the train is entering
author smatz <smatz@openttd.org>
date Tue, 11 Dec 2007 19:09:36 +0000
parents 99ade4087f55
children 3cb0afbc2249
files src/train_cmd.cpp
diffstat 1 files changed, 3 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/train_cmd.cpp
+++ b/src/train_cmd.cpp
@@ -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);