mirror of https://github.com/OpenTTD/OpenTTD
(svn r11619) -Fix [FS#1531]: do not make crossing red behind depot the train is entering
parent
fb1d768924
commit
359c9aea3f
|
@ -3240,8 +3240,9 @@ static bool TrainCheckIfLineEnds(Vehicle *v)
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if ((ts &= (ts >> 16)) == 0) {
|
if ((ts &= (ts >> 16)) == 0) {
|
||||||
/* make a rail/road crossing red */
|
/* make a rail/road crossing red
|
||||||
if (IsLevelCrossingTile(tile)) {
|
* 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)) {
|
if (!IsCrossingBarred(tile)) {
|
||||||
BarCrossing(tile);
|
BarCrossing(tile);
|
||||||
SndPlayVehicleFx(SND_0E_LEVEL_CROSSING, v);
|
SndPlayVehicleFx(SND_0E_LEVEL_CROSSING, v);
|
||||||
|
|
Loading…
Reference in New Issue