(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

This commit is contained in:
rubidium
2009-07-24 15:18:25 +00:00
parent cf38a5bee6
commit c3d2c47faa
10 changed files with 50 additions and 44 deletions

View File

@@ -543,7 +543,7 @@ no_entry_cost: // jump here at the beginning if the node has no parent (it is th
/* Station platform-length penalty. */
if ((end_segment_reason & ESRB_STATION) != ESRB_NONE) {
Station *st = Station::GetByTile(n.GetLastTile());
const BaseStation *st = BaseStation::GetByTile(n.GetLastTile());
assert(st != NULL);
uint platform_length = st->GetPlatformLength(n.GetLastTile(), ReverseDiagDir(TrackdirToExitdir(n.GetLastTrackdir())));
/* Reduce the extra cost caused by passing-station penalty (each station receives it in the segment cost). */