Fix b0e73277: cargodist information got lost when splitting of cargo (#11280)

During b0e73277 we removed loaded_at_xy, but I kinda forgot that
it was a union with next_station. Now next_station wasn't copied
anymore, or checked in AreMergable.

(cherry picked from commit e6c02ebee6)
This commit is contained in:
Patric Stout
2023-09-10 15:20:58 +02:00
committed by Jonathan G Rennison
parent e5673a1756
commit f5d685a525
5 changed files with 12 additions and 8 deletions

View File

@@ -1353,7 +1353,7 @@ bool LoadOldVehicle(LoadgameState *ls, int num)
if (_cargo_count != 0 && CargoPacket::CanAllocateItem()) {
StationID source = (_cargo_source == 0xFF) ? INVALID_STATION : _cargo_source;
TileIndex source_xy = (source != INVALID_STATION) ? Station::Get(source)->xy : 0;
v->cargo.Append(new CargoPacket(_cargo_count, _cargo_periods, source, source_xy));
v->cargo.Append(new CargoPacket(_cargo_count, _cargo_periods, source, INVALID_STATION, source_xy));
}
}