summaryrefslogtreecommitdiff
path: root/station_cmd.c
diff options
context:
space:
mode:
authormatthijs <matthijs@openttd.org>2006-12-05 13:58:20 +0000
committermatthijs <matthijs@openttd.org>2006-12-05 13:58:20 +0000
commite6ade36de112f7a5a89513278e6784ba4f26c79f (patch)
treee23ebc401e3e8f7037ad38701e00a6bf1fb61136 /station_cmd.c
parent75ec6d9b777400031fc90b82c8b056166365567b (diff)
downloadopenttd-e6ade36de112f7a5a89513278e6784ba4f26c79f.tar.xz
(svn r7372) - CodeChange: Rename all GetXXXArraySize() functions to GetNumXXX() and add GetMaxXXXIndex() functions. This prepares for the new pool interface.
Diffstat (limited to 'station_cmd.c')
-rw-r--r--station_cmd.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/station_cmd.c b/station_cmd.c
index d2f8288a5..21c98a9e4 100644
--- a/station_cmd.c
+++ b/station_cmd.c
@@ -2548,7 +2548,7 @@ void OnTick_Station(void)
if (_game_mode == GM_EDITOR) return;
i = _station_tick_ctr;
- if (++_station_tick_ctr == GetStationArraySize()) _station_tick_ctr = 0;
+ if (++_station_tick_ctr > GetMaxStationIndex()) _station_tick_ctr = 0;
if (IsValidStationID(i)) StationHandleBigTick(GetStation(i));
@@ -3098,7 +3098,7 @@ static void Load_STNS(void)
}
/* This is to ensure all pointers are within the limits of _stations_size */
- if (_station_tick_ctr > GetStationArraySize()) _station_tick_ctr = 0;
+ if (_station_tick_ctr > GetMaxStationIndex()) _station_tick_ctr = 0;
}
static void Save_ROADSTOP(void)