summaryrefslogtreecommitdiff
path: root/src/yapf/follow_track.hpp
diff options
context:
space:
mode:
authorcelestar <celestar@openttd.org>2007-02-13 16:36:38 +0000
committercelestar <celestar@openttd.org>2007-02-13 16:36:38 +0000
commitd9385f27986a59fa6b4a557e9bd6a04dc80752d8 (patch)
tree95900e955779b893062a6fbfbae3fa7fcf8323d1 /src/yapf/follow_track.hpp
parent5e880a6a75d5fb3e9d9b90d30ebd720c9dce2a6e (diff)
downloadopenttd-d9385f27986a59fa6b4a557e9bd6a04dc80752d8.tar.xz
(svn r8709) -Fix/Codechange: Rename the function GetStationPlatforms into GetPlatformLength because that is what it really does. Overload it because there is already a GetPlatformLength (one gives the length of the whole platform, the other gives the remaining length in a given direction). Turned both functions into methods of Station. While messing around with it, fix a problem where loading times for overhanging trains are miscomputed.
Diffstat (limited to 'src/yapf/follow_track.hpp')
-rw-r--r--src/yapf/follow_track.hpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/yapf/follow_track.hpp b/src/yapf/follow_track.hpp
index 4c81caeb4..04ffecf5d 100644
--- a/src/yapf/follow_track.hpp
+++ b/src/yapf/follow_track.hpp
@@ -197,7 +197,7 @@ protected:
if (IsRailTT() && m_is_station) {
// entered railway station
// get platform length
- uint length = GetPlatformLength(m_new_tile, TrackdirToExitdir(m_old_td));
+ uint length = GetStationByTile(m_new_tile)->GetPlatformLength(m_new_tile, TrackdirToExitdir(m_old_td));
// how big step we must do to get to the last platform tile;
m_tiles_skipped = length - 1;
// move to the platform end