diff options
author | matthijs <matthijs@openttd.org> | 2006-12-05 13:58:20 +0000 |
---|---|---|
committer | matthijs <matthijs@openttd.org> | 2006-12-05 13:58:20 +0000 |
commit | 9218fc16e6fff350e6209b6b90b8597fc431f00f (patch) | |
tree | e23ebc401e3e8f7037ad38701e00a6bf1fb61136 /station_cmd.c | |
parent | 681f994d16a71813144352b3a6ef05a22cb8b3ff (diff) | |
download | openttd-9218fc16e6fff350e6209b6b90b8597fc431f00f.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.c | 4 |
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) |