summaryrefslogtreecommitdiff
path: root/station_cmd.c
diff options
context:
space:
mode:
authorpeter1138 <peter1138@openttd.org>2006-04-28 20:48:45 +0000
committerpeter1138 <peter1138@openttd.org>2006-04-28 20:48:45 +0000
commit725f04b0e1dde00890ef3b6cceb83b15ce0a5a16 (patch)
tree9f97141f411fbcff88698642468f0697a49919f3 /station_cmd.c
parent7273bd490d1a1fddb61b0577ed1d03ebbbcc2ed6 (diff)
downloadopenttd-725f04b0e1dde00890ef3b6cceb83b15ce0a5a16.tar.xz
(svn r4612) - NewStations: add random bits (for graphic variation) to stations
Diffstat (limited to 'station_cmd.c')
-rw-r--r--station_cmd.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/station_cmd.c b/station_cmd.c
index df14054ed..61d5d79a8 100644
--- a/station_cmd.c
+++ b/station_cmd.c
@@ -490,6 +490,9 @@ static void StationInitialize(Station *st, TileIndex tile)
ge->feeder_profit = 0;
}
+ st->random_bits = Random();
+ st->waiting_triggers = 0;
+
_global_station_sort_dirty = true; // build a new station
}
@@ -2851,6 +2854,10 @@ static const SaveLoad _station_desc[] = {
SLE_CONDREF(Station,bus_stops, REF_ROADSTOPS, 6, SL_MAX_VERSION),
SLE_CONDREF(Station,truck_stops, REF_ROADSTOPS, 6, SL_MAX_VERSION),
+ /* Used by newstations for graphic variations */
+ SLE_CONDVAR(Station,random_bits, SLE_UINT16, 27, SL_MAX_VERSION),
+ SLE_CONDVAR(Station,waiting_triggers, SLE_UINT8, 27, SL_MAX_VERSION),
+
// reserve extra space in savegame here. (currently 32 bytes)
SLE_CONDNULL(32, 2, SL_MAX_VERSION),