summaryrefslogtreecommitdiff
path: root/src/saveload/oldloader_sl.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/saveload/oldloader_sl.cpp')
-rw-r--r--src/saveload/oldloader_sl.cpp14
1 files changed, 8 insertions, 6 deletions
diff --git a/src/saveload/oldloader_sl.cpp b/src/saveload/oldloader_sl.cpp
index a0c8d06af..900cbd4ab 100644
--- a/src/saveload/oldloader_sl.cpp
+++ b/src/saveload/oldloader_sl.cpp
@@ -698,10 +698,8 @@ static bool LoadOldGood(LoadgameState *ls, int num)
SB(ge->acceptance_pickup, GoodsEntry::ACCEPTANCE, 1, HasBit(_waiting_acceptance, 15));
SB(ge->acceptance_pickup, GoodsEntry::PICKUP, 1, _cargo_source != 0xFF);
if (GB(_waiting_acceptance, 0, 12) != 0) {
- CargoPacket *cp = new CargoPacket();
- cp->source = (_cargo_source == 0xFF) ? INVALID_STATION : _cargo_source;
- cp->count = GB(_waiting_acceptance, 0, 12);
- cp->days_in_transit = _cargo_days;
+ CargoPacket *cp = new CargoPacket(GB(_waiting_acceptance, 0, 12), _cargo_days);
+ cp->source = (_cargo_source == 0xFF) ? INVALID_STATION : _cargo_source;
ge->cargo.Append(cp);
}
@@ -1332,8 +1330,12 @@ bool LoadOldVehicle(LoadgameState *ls, int num)
v->next = (Vehicle *)(size_t)_old_next_ptr;
if (_cargo_count != 0) {
- CargoPacket *cp = new CargoPacket((_cargo_source == 0xFF) ? INVALID_STATION : _cargo_source, _cargo_count);
- cp->days_in_transit = _cargo_days;
+ CargoPacket *cp = new CargoPacket(_cargo_count, _cargo_days);
+ cp->source = (_cargo_source == 0xFF) ? INVALID_STATION : _cargo_source;
+ cp->source_xy = (cp->source != INVALID_STATION) ? Station::Get(cp->source)->xy : 0;
+ cp->loaded_at_xy = cp->source_xy;
+ cp->source_type = ST_INDUSTRY;
+ cp->source_id = INVALID_SOURCE;
v->cargo.Append(cp);
}
}