mirror of https://github.com/OpenTTD/OpenTTD
(svn r6223) -Fix: RVs with empty order list were able to enter the depot or road stop from the back. I introduced this bug when I "improved" GetTileTrackStatus(). (thanks glx for the report and fix).
parent
b83a3f8726
commit
f3df0aa6e8
|
@ -1035,13 +1035,13 @@ static int RoadFindPathToDest(Vehicle* v, TileIndex tile, DiagDirection enterdir
|
||||||
}
|
}
|
||||||
|
|
||||||
if (IsTileType(tile, MP_STREET)) {
|
if (IsTileType(tile, MP_STREET)) {
|
||||||
if (GetRoadTileType(tile) == ROAD_TILE_DEPOT && !IsTileOwner(tile, v->owner)) {
|
if (GetRoadTileType(tile) == ROAD_TILE_DEPOT && (!IsTileOwner(tile, v->owner) || GetRoadDepotDirection(tile) == enterdir)) {
|
||||||
/* Road depot owned by another player */
|
/* Road depot owned by another player or with the wrong orientation */
|
||||||
bitmask = 0;
|
bitmask = 0;
|
||||||
}
|
}
|
||||||
} else if (IsTileType(tile, MP_STATION) && IsRoadStopTile(tile)) {
|
} else if (IsTileType(tile, MP_STATION) && IsRoadStopTile(tile)) {
|
||||||
if (!IsTileOwner(tile, v->owner)) {
|
if (!IsTileOwner(tile, v->owner) || GetRoadStopDir(tile) == enterdir) {
|
||||||
// different station owner
|
/* different station owner or wrong orientation */
|
||||||
bitmask = 0;
|
bitmask = 0;
|
||||||
} else {
|
} else {
|
||||||
/* Our station */
|
/* Our station */
|
||||||
|
|
Loading…
Reference in New Issue