Changeset - r6040:46befea99a66
[Not reviewed]
master
0 1 0
KUDr - 17 years ago 2007-02-17 00:18:11
kudr@openttd.org
(svn r8766) -Fix[YAPF]: rail station platform penalty not calculated properly
1 file changed with 2 insertions and 2 deletions:
0 comments (0 inline, 0 general)
src/yapf/yapf_costrail.hpp
Show inline comments
 
@@ -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;
 
				}
 
			}
 

	
0 comments (0 inline, 0 general)