mirror of https://github.com/OpenTTD/OpenTTD
Codechange: use correct type for variable to prevent casts later on
parent
f6ab2b69c6
commit
c5dac6e619
|
@ -631,8 +631,8 @@ void FixupTrainLengths()
|
||||||
}
|
}
|
||||||
|
|
||||||
static uint8_t _cargo_periods;
|
static uint8_t _cargo_periods;
|
||||||
static uint16_t _cargo_source;
|
static StationID _cargo_source;
|
||||||
static uint32_t _cargo_source_xy;
|
static TileIndex _cargo_source_xy;
|
||||||
static uint16_t _cargo_count;
|
static uint16_t _cargo_count;
|
||||||
static uint16_t _cargo_paid_for;
|
static uint16_t _cargo_paid_for;
|
||||||
static Money _cargo_feeder_share;
|
static Money _cargo_feeder_share;
|
||||||
|
@ -1138,7 +1138,7 @@ struct VEHSChunkHandler : ChunkHandler {
|
||||||
|
|
||||||
if (_cargo_count != 0 && IsCompanyBuildableVehicleType(v) && CargoPacket::CanAllocateItem()) {
|
if (_cargo_count != 0 && IsCompanyBuildableVehicleType(v) && CargoPacket::CanAllocateItem()) {
|
||||||
/* 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 */
|
||||||
CargoPacket *cp = new CargoPacket(_cargo_count, _cargo_periods, _cargo_source, TileIndex{_cargo_source_xy}, _cargo_feeder_share);
|
CargoPacket *cp = new CargoPacket(_cargo_count, _cargo_periods, _cargo_source, _cargo_source_xy, _cargo_feeder_share);
|
||||||
v->cargo.Append(cp);
|
v->cargo.Append(cp);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue