summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2007-06-22 17:34:04 +0000
committerrubidium <rubidium@openttd.org>2007-06-22 17:34:04 +0000
commit74b867db72f3534d271cdf43747f80c99e0ae2df (patch)
treeb2be9aed7a4563b0236d4cd6ae268166c9719e35
parent96d208d04bb33eec9058d04b95abbfa1e7b2f75f (diff)
downloadopenttd-74b867db72f3534d271cdf43747f80c99e0ae2df.tar.xz
(svn r10269) -Fix [FS#912]: station ratings were shown for all cargos instead of only the cargos that have been transported.
-rw-r--r--src/station.h2
-rw-r--r--src/station_cmd.cpp4
2 files changed, 4 insertions, 2 deletions
diff --git a/src/station.h b/src/station.h
index 10ba050c1..25f77e7d2 100644
--- a/src/station.h
+++ b/src/station.h
@@ -20,7 +20,7 @@ static const byte INITIAL_STATION_RATING = 175;
struct GoodsEntry {
GoodsEntry() :
acceptance(false),
- days_since_pickup(0),
+ days_since_pickup(255),
rating(INITIAL_STATION_RATING),
last_speed(0),
last_age(255)
diff --git a/src/station_cmd.cpp b/src/station_cmd.cpp
index c4fcff060..933c89eae 100644
--- a/src/station_cmd.cpp
+++ b/src/station_cmd.cpp
@@ -2944,7 +2944,7 @@ static void SaveLoad_STNS(Station *st)
for (CargoID i = 0; i < num_cargo; i++) {
GoodsEntry *ge = &st->goods[i];
SlObject(ge, _goods_desc);
- if (_waiting_acceptance != 0) {
+ if (CheckSavegameVersion(68)) {
ge->acceptance = HASBIT(_waiting_acceptance, 15);
if (GB(_waiting_acceptance, 0, 12) != 0) {
/* Don't construct the packet with station here, because that'll fail with old savegames */
@@ -2958,6 +2958,8 @@ static void SaveLoad_STNS(Station *st)
cp->days_in_transit = _cargo_days;
cp->feeder_share = _cargo_feeder_share;
ge->cargo.Append(cp);
+ } else {
+ ge->days_since_pickup = 255;
}
}
}