summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsmatz <smatz@openttd.org>2007-12-11 22:50:13 +0000
committersmatz <smatz@openttd.org>2007-12-11 22:50:13 +0000
commited54703db8dbd9a0b09c2e804fda1eb544a22324 (patch)
treef3b3fdf6faa33d44bc1c90d91254d883c0a364e3
parent78ae599790c83b29fc46db0af9b068f130fc071e (diff)
downloadopenttd-ed54703db8dbd9a0b09c2e804fda1eb544a22324.tar.xz
(svn r11623) -Fix [FS#1533] (r11619): assert when train is going over two crossings next to each other
-rw-r--r--src/train_cmd.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/train_cmd.cpp b/src/train_cmd.cpp
index 2e9f39bc3..6b71962a1 100644
--- a/src/train_cmd.cpp
+++ b/src/train_cmd.cpp
@@ -3242,7 +3242,7 @@ static bool TrainCheckIfLineEnds(Vehicle *v)
if ((ts &= (ts >> 16)) == 0) {
/* 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 (IsLevelCrossingTile(tile) && (!IsTileDepotType(v->tile, TRANSPORT_RAIL) || GetRailDepotDirection(v->tile) == dir)) {
if (!IsCrossingBarred(tile)) {
BarCrossing(tile);
SndPlayVehicleFx(SND_0E_LEVEL_CROSSING, v);