summaryrefslogtreecommitdiff
path: root/src/pathfind.h
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2009-07-30 17:44:13 +0000
committerrubidium <rubidium@openttd.org>2009-07-30 17:44:13 +0000
commit5592eb49556630e7277cabb68c9d7a185eebd7f6 (patch)
treec9bb9482ae91f9c80145c41001fec505fe812a7c /src/pathfind.h
parent4a1f6547c678331f5e16b0c06c1e84eaa7d50db9 (diff)
downloadopenttd-5592eb49556630e7277cabb68c9d7a185eebd7f6.tar.xz
(svn r16993) -Change: make the rail waypoint builder draggable
Diffstat (limited to 'src/pathfind.h')
-rw-r--r--src/pathfind.h5
1 files changed, 1 insertions, 4 deletions
diff --git a/src/pathfind.h b/src/pathfind.h
index 6cb9f688a..56e315e18 100644
--- a/src/pathfind.h
+++ b/src/pathfind.h
@@ -90,10 +90,7 @@ void NewTrainPathfind(TileIndex tile, TileIndex dest, RailTypes railtypes, DiagD
*/
static inline TileIndex CalcClosestStationTile(StationID station, TileIndex tile)
{
- const BaseStation *bst = BaseStation::Get(station);
- if (Waypoint::IsExpected(bst)) return bst->xy;
-
- const Station *st = Station::From(bst);
+ const BaseStation *st = BaseStation::Get(station);
/* If the rail station is (temporarily) not present, use the station sign to drive near the station */
if (st->train_station.tile == INVALID_TILE) return st->xy;