diff options
author | frosch <frosch@openttd.org> | 2013-05-06 13:05:04 +0000 |
---|---|---|
committer | frosch <frosch@openttd.org> | 2013-05-06 13:05:04 +0000 |
commit | b9528c3aa01c4d28cf58514e6371db9931ce6400 (patch) | |
tree | 8e3165444c0042517eef757f7a978cb823f8a1ec /src/newgrf_station.cpp | |
parent | 02924a1d3e39d0a5d9c417b970cffc2c94118828 (diff) | |
download | openttd-b9528c3aa01c4d28cf58514e6371db9931ce6400.tar.xz |
(svn r25221) -Fix: IsCompatibleTrainStationTile() is not a symmetric function. Clarify the parameters and fix the cases were they were swapped.
Diffstat (limited to 'src/newgrf_station.cpp')
-rw-r--r-- | src/newgrf_station.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/newgrf_station.cpp b/src/newgrf_station.cpp index 399910d1f..713961239 100644 --- a/src/newgrf_station.cpp +++ b/src/newgrf_station.cpp @@ -73,8 +73,8 @@ struct ETileArea : TileArea { Axis axis = GetRailStationAxis(tile); TileIndexDiff delta = TileOffsByDiagDir(AxisToDiagDir(axis)); - for (end = tile; IsRailStationTile(end + delta) && IsCompatibleTrainStationTile(tile, end + delta); end += delta) { /* Nothing */ } - for (start = tile; IsRailStationTile(start - delta) && IsCompatibleTrainStationTile(tile, start - delta); start -= delta) { /* Nothing */ } + for (end = tile; IsRailStationTile(end + delta) && IsCompatibleTrainStationTile(end + delta, tile); end += delta) { /* Nothing */ } + for (start = tile; IsRailStationTile(start - delta) && IsCompatibleTrainStationTile(start - delta, tile); start -= delta) { /* Nothing */ } this->tile = start; this->w = TileX(end) - TileX(start) + 1; |