mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2025-03-09 07:29:44 +00:00
(svn r10269) -Fix [FS#912]: station ratings were shown for all cargos instead of only the cargos that have been transported.
This commit is contained in:
parent
96d208d04b
commit
74b867db72
@ -20,7 +20,7 @@ static const byte INITIAL_STATION_RATING = 175;
|
|||||||
struct GoodsEntry {
|
struct GoodsEntry {
|
||||||
GoodsEntry() :
|
GoodsEntry() :
|
||||||
acceptance(false),
|
acceptance(false),
|
||||||
days_since_pickup(0),
|
days_since_pickup(255),
|
||||||
rating(INITIAL_STATION_RATING),
|
rating(INITIAL_STATION_RATING),
|
||||||
last_speed(0),
|
last_speed(0),
|
||||||
last_age(255)
|
last_age(255)
|
||||||
|
@ -2944,7 +2944,7 @@ static void SaveLoad_STNS(Station *st)
|
|||||||
for (CargoID i = 0; i < num_cargo; i++) {
|
for (CargoID i = 0; i < num_cargo; i++) {
|
||||||
GoodsEntry *ge = &st->goods[i];
|
GoodsEntry *ge = &st->goods[i];
|
||||||
SlObject(ge, _goods_desc);
|
SlObject(ge, _goods_desc);
|
||||||
if (_waiting_acceptance != 0) {
|
if (CheckSavegameVersion(68)) {
|
||||||
ge->acceptance = HASBIT(_waiting_acceptance, 15);
|
ge->acceptance = HASBIT(_waiting_acceptance, 15);
|
||||||
if (GB(_waiting_acceptance, 0, 12) != 0) {
|
if (GB(_waiting_acceptance, 0, 12) != 0) {
|
||||||
/* Don't construct the packet with station here, because that'll fail with old savegames */
|
/* 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->days_in_transit = _cargo_days;
|
||||||
cp->feeder_share = _cargo_feeder_share;
|
cp->feeder_share = _cargo_feeder_share;
|
||||||
ge->cargo.Append(cp);
|
ge->cargo.Append(cp);
|
||||||
|
} else {
|
||||||
|
ge->days_since_pickup = 255;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user