Mercurial > hg > openttd
changeset 6040:0438dc727808 draft
(svn r8766) -Fix[YAPF]: rail station platform penalty not calculated properly
author | KUDr <KUDr@openttd.org> |
---|---|
date | Sat, 17 Feb 2007 00:18:11 +0000 |
parents | d9b8ee9baa74 |
children | 1342ec694693 |
files | src/yapf/yapf_costrail.hpp |
diffstat | 1 files changed, 2 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/src/yapf/yapf_costrail.hpp +++ b/src/yapf/yapf_costrail.hpp @@ -282,13 +282,13 @@ // add penalty for skipped station tiles if (F.m_is_station) { + uint platform_length = F.m_tiles_skipped + 1; if (target_seen) { // it is our destination station - uint platform_length = F.m_tiles_skipped + 1; segment_cost += PlatformLengthPenalty(platform_length); } else { // station is not our destination station, apply penalty for skipped platform tiles - segment_cost += Yapf().PfGetSettings().rail_station_penalty * F.m_tiles_skipped; + segment_cost += Yapf().PfGetSettings().rail_station_penalty * platform_length; } }