diff options
author | KUDr <KUDr@openttd.org> | 2007-02-17 00:18:11 +0000 |
---|---|---|
committer | KUDr <KUDr@openttd.org> | 2007-02-17 00:18:11 +0000 |
commit | 3c0b59e46e8ae47ff1bb8d8e13cefb76493ada87 (patch) | |
tree | dd520a87ed6a580b0f92874ab381b774c1c615fb /src/yapf/yapf_costrail.hpp | |
parent | c96f7c91e534e0eafe9b0f52c1aa16c4ea002ec7 (diff) | |
download | openttd-3c0b59e46e8ae47ff1bb8d8e13cefb76493ada87.tar.xz |
(svn r8766) -Fix[YAPF]: rail station platform penalty not calculated properly
Diffstat (limited to 'src/yapf/yapf_costrail.hpp')
-rw-r--r-- | src/yapf/yapf_costrail.hpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/yapf/yapf_costrail.hpp b/src/yapf/yapf_costrail.hpp index b48257e46..e1fd61068 100644 --- a/src/yapf/yapf_costrail.hpp +++ b/src/yapf/yapf_costrail.hpp @@ -282,13 +282,13 @@ public: // 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; } } |