diff options
author | truelight <truelight@openttd.org> | 2004-09-06 18:33:51 +0000 |
---|---|---|
committer | truelight <truelight@openttd.org> | 2004-09-06 18:33:51 +0000 |
commit | d2dd128b0d68d0b388890f8ff36e184b7d52afca (patch) | |
tree | 101410fe2198acfe828a17a78a461fd381272f3d /train_cmd.c | |
parent | aa0212515882c5a90c3f2cb86f05952b832a5a9f (diff) | |
download | openttd-d2dd128b0d68d0b388890f8ff36e184b7d52afca.tar.xz |
(svn r167) -Fix: [972247] bug in '[a] weird non-uniform stations handling'
(blathijs)
Diffstat (limited to 'train_cmd.c')
-rw-r--r-- | train_cmd.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/train_cmd.c b/train_cmd.c index 342883e1f..4c2f52d2a 100644 --- a/train_cmd.c +++ b/train_cmd.c @@ -1306,8 +1306,11 @@ static bool TrainTrackFollower(uint tile, TrainTrackFollowerData *ttfd, int trac return false; // did we reach the final station? - if (tile == ttfd->dest_coords || - (IS_TILETYPE(tile, MP_STATION) && IS_BYTE_INSIDE(_map5[tile], 0, 8) && _map2[tile] == ttfd->station_index)) { + if ((ttfd->station_index == -1 && tile == ttfd->dest_coords) || + (IS_TILETYPE(tile, MP_STATION) && IS_BYTE_INSIDE(_map5[tile], 0, 8) && _map2[tile] == ttfd->station_index)) { + /* We do not check for dest_coords if we have a station_index, + * because in that case the dest_coords are just an + * approximation of where the station is */ // found station ttfd->best_bird_dist = 0; if (length < ttfd->best_track_dist) { |