diff options
author | KUDr <KUDr@openttd.org> | 2006-08-29 19:46:31 +0000 |
---|---|---|
committer | KUDr <KUDr@openttd.org> | 2006-08-29 19:46:31 +0000 |
commit | 01048caeb04d4e31ef6fdcfba1c908975d91911b (patch) | |
tree | 85eedcebb06559052485df6e24711d02bc6c4ea9 /roadveh_cmd.c | |
parent | dae76ce67ea71154e0bd87a4180c7496233e9ca9 (diff) | |
download | openttd-01048caeb04d4e31ef6fdcfba1c908975d91911b.tar.xz |
(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).
Diffstat (limited to 'roadveh_cmd.c')
-rw-r--r-- | roadveh_cmd.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/roadveh_cmd.c b/roadveh_cmd.c index 93e3ff0d3..00843d65a 100644 --- a/roadveh_cmd.c +++ b/roadveh_cmd.c @@ -1035,13 +1035,13 @@ static int RoadFindPathToDest(Vehicle* v, TileIndex tile, DiagDirection enterdir } if (IsTileType(tile, MP_STREET)) { - if (GetRoadTileType(tile) == ROAD_TILE_DEPOT && !IsTileOwner(tile, v->owner)) { - /* Road depot owned by another player */ + if (GetRoadTileType(tile) == ROAD_TILE_DEPOT && (!IsTileOwner(tile, v->owner) || GetRoadDepotDirection(tile) == enterdir)) { + /* Road depot owned by another player or with the wrong orientation */ bitmask = 0; } } else if (IsTileType(tile, MP_STATION) && IsRoadStopTile(tile)) { - if (!IsTileOwner(tile, v->owner)) { - // different station owner + if (!IsTileOwner(tile, v->owner) || GetRoadStopDir(tile) == enterdir) { + /* different station owner or wrong orientation */ bitmask = 0; } else { /* Our station */ |