diff options
author | frosch <frosch@openttd.org> | 2011-05-21 11:26:37 +0000 |
---|---|---|
committer | frosch <frosch@openttd.org> | 2011-05-21 11:26:37 +0000 |
commit | 474b4799e8792d4b4bd00aee512327c682796d66 (patch) | |
tree | 9ea018b4860e4dcbd1e3f37421794ac56011247b /src/station_cmd.cpp | |
parent | 2447efdefd6a52c7be8bbe3c5493dd36b0697804 (diff) | |
download | openttd-474b4799e8792d4b4bd00aee512327c682796d66.tar.xz |
(svn r22482) -Codechange: Add some contants for the number of ticks between certain cyclical tasks.
Diffstat (limited to 'src/station_cmd.cpp')
-rw-r--r-- | src/station_cmd.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/station_cmd.cpp b/src/station_cmd.cpp index 0f39e7211..7cd32972d 100644 --- a/src/station_cmd.cpp +++ b/src/station_cmd.cpp @@ -3131,7 +3131,7 @@ static void StationHandleSmallTick(BaseStation *st) if ((st->facilities & FACIL_WAYPOINT) != 0 || !st->IsInUse()) return; byte b = st->delete_ctr + 1; - if (b >= 185) b = 0; + if (b >= STATION_RATING_TICKS) b = 0; st->delete_ctr = b; if (b == 0) UpdateStationRating(Station::From(st)); @@ -3145,10 +3145,10 @@ void OnTick_Station() FOR_ALL_BASE_STATIONS(st) { StationHandleSmallTick(st); - /* Run 250 tick interval trigger for station animation. + /* Run STATION_ACCEPTANCE_TICKS = 250 tick interval trigger for station animation. * Station index is included so that triggers are not all done * at the same time. */ - if ((_tick_counter + st->index) % 250 == 0) { + if ((_tick_counter + st->index) % STATION_ACCEPTANCE_TICKS == 0) { /* Stop processing this station if it was deleted */ if (!StationHandleBigTick(st)) continue; TriggerStationAnimation(st, st->xy, SAT_250_TICKS); |