(svn r16993) -Change: make the rail waypoint builder draggable

This commit is contained in:
rubidium
2009-07-30 17:44:13 +00:00
parent e035054ab6
commit 1ab2d22318
7 changed files with 128 additions and 62 deletions

View File

@@ -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;