Reorder struct CargoPacket
Reduce size from 40 bytes to 32 bytes. See: https://github.com/OpenTTD/OpenTTD/pull/11201
This commit is contained in:
@@ -53,18 +53,18 @@ void ChangeOwnershipOfCargoPacketDeferredPayments(Owner old_owner, Owner new_own
|
||||
*/
|
||||
struct CargoPacket : CargoPacketPool::PoolItem<&_cargopacket_pool> {
|
||||
private:
|
||||
Money feeder_share; ///< Value of feeder pickup to be paid for on delivery of cargo.
|
||||
uint16 count; ///< The amount of cargo in this packet.
|
||||
uint16 days_in_transit; ///< Amount of days this packet has been in transit.
|
||||
SourceType source_type; ///< Type of \c source_id.
|
||||
Money feeder_share; ///< Value of feeder pickup to be paid for on delivery of cargo.
|
||||
SourceID source_id; ///< Index of source, INVALID_SOURCE if unknown/invalid.
|
||||
StationID source; ///< The station where the cargo came from first.
|
||||
TileIndex source_xy; ///< The origin of the cargo (first station in feeder chain).
|
||||
union {
|
||||
TileOrStationID loaded_at_xy; ///< Location where this cargo has been loaded into the vehicle.
|
||||
TileOrStationID next_station; ///< Station where the cargo wants to go next.
|
||||
};
|
||||
uint flags = 0; ///< NOSAVE: temporary flags
|
||||
StationID source; ///< The station where the cargo came from first.
|
||||
SourceType source_type; ///< Type of \c source_id.
|
||||
uint8 flags = 0; ///< NOSAVE: temporary flags
|
||||
|
||||
/** Cargo packet flag bits in CargoPacket::flags. */
|
||||
enum CargoPacketFlags {
|
||||
|
Reference in New Issue
Block a user