diff options
author | rubidium <rubidium@openttd.org> | 2009-07-24 15:18:25 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2009-07-24 15:18:25 +0000 |
commit | c3d2c47faa6bb9c07c362127b4fb5de79130bfa0 (patch) | |
tree | 6478960a00fd8d58956b9fdb0981ad1bf995f373 /src/station.cpp | |
parent | cf38a5bee6628f4be58a1bd7774658cf86807d5c (diff) | |
download | openttd-c3d2c47faa6bb9c07c362127b4fb5de79130bfa0.tar.xz |
(svn r16940) -Codechange: make the pathfinders behave the same when finding waypoints or stations, i.e. don't force exactly one destination tile for a waypoint
Diffstat (limited to 'src/station.cpp')
-rw-r--r-- | src/station.cpp | 17 |
1 files changed, 3 insertions, 14 deletions
diff --git a/src/station.cpp b/src/station.cpp index 0f2555ffb..59664e289 100644 --- a/src/station.cpp +++ b/src/station.cpp @@ -181,12 +181,7 @@ void Station::MarkTilesDirty(bool cargo_change) const } } -/** Obtain the length of a platform - * @pre tile must be a rail station tile - * @param tile A tile that contains the platform in question - * @return The length of the platform - */ -uint Station::GetPlatformLength(TileIndex tile) const +/* virtual */ uint Station::GetPlatformLength(TileIndex tile) const { assert(this->TileBelongsToRailStation(tile)); @@ -208,13 +203,7 @@ uint Station::GetPlatformLength(TileIndex tile) const return len - 1; } -/** Determines the REMAINING length of a platform, starting at (and including) - * the given tile. - * @param tile the tile from which to start searching. Must be a rail station tile - * @param dir The direction in which to search. - * @return The platform length - */ -uint Station::GetPlatformLength(TileIndex tile, DiagDirection dir) const +/* virtual */ uint Station::GetPlatformLength(TileIndex tile, DiagDirection dir) const { TileIndex start_tile = tile; uint length = 0; @@ -222,7 +211,7 @@ uint Station::GetPlatformLength(TileIndex tile, DiagDirection dir) const assert(dir < DIAGDIR_END); do { - length ++; + length++; tile += TileOffsByDiagDir(dir); } while (IsCompatibleTrainStationTile(tile, start_tile)); |