mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2025-02-06 22:37:22 +00:00
(svn r11623) -Fix [FS#1533] (r11619): assert when train is going over two crossings next to each other
This commit is contained in:
parent
78ae599790
commit
ed54703db8
@ -3242,7 +3242,7 @@ static bool TrainCheckIfLineEnds(Vehicle *v)
|
|||||||
if ((ts &= (ts >> 16)) == 0) {
|
if ((ts &= (ts >> 16)) == 0) {
|
||||||
/* make a rail/road crossing red
|
/* make a rail/road crossing red
|
||||||
* do not make crossing red behind depot the train is entering */
|
* 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)) {
|
if (!IsCrossingBarred(tile)) {
|
||||||
BarCrossing(tile);
|
BarCrossing(tile);
|
||||||
SndPlayVehicleFx(SND_0E_LEVEL_CROSSING, v);
|
SndPlayVehicleFx(SND_0E_LEVEL_CROSSING, v);
|
||||||
|
Loading…
Reference in New Issue
Block a user