summaryrefslogtreecommitdiff
path: root/src/train_cmd.cpp
diff options
context:
space:
mode:
authorsmatz <smatz@openttd.org>2007-12-11 19:09:36 +0000
committersmatz <smatz@openttd.org>2007-12-11 19:09:36 +0000
commit359c9aea3fc39f44e1b8605c936ed33e97e1ac0a (patch)
tree2672b534b4e39e4f6e31f217497bed823776064c /src/train_cmd.cpp
parentfb1d7689249d2553a188055aa8c68efa4e9294a6 (diff)
downloadopenttd-359c9aea3fc39f44e1b8605c936ed33e97e1ac0a.tar.xz
(svn r11619) -Fix [FS#1531]: do not make crossing red behind depot the train is entering
Diffstat (limited to 'src/train_cmd.cpp')
-rw-r--r--src/train_cmd.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/train_cmd.cpp b/src/train_cmd.cpp
index 5a4c854fe..2e9f39bc3 100644
--- a/src/train_cmd.cpp
+++ b/src/train_cmd.cpp
@@ -3240,8 +3240,9 @@ static bool TrainCheckIfLineEnds(Vehicle *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);