mirror of
https://github.com/OpenTTD/OpenTTD
synced 2026-01-15 16:32:41 +01:00
Codechange: move knowledge about 'packed' orders to the saveload code
This commit is contained in:
@@ -227,22 +227,6 @@ uint16_t Order::MapOldOrder() const
|
||||
return order;
|
||||
}
|
||||
|
||||
/**
|
||||
* Create an order based on a packed representation of that order.
|
||||
* @param packed the packed representation.
|
||||
*/
|
||||
Order::Order(uint32_t packed)
|
||||
{
|
||||
this->type = (OrderType)GB(packed, 0, 8);
|
||||
this->flags = GB(packed, 8, 8);
|
||||
this->dest = GB(packed, 16, 16);
|
||||
this->next = nullptr;
|
||||
this->refit_cargo = CARGO_NO_REFIT;
|
||||
this->wait_time = 0;
|
||||
this->travel_time = 0;
|
||||
this->max_speed = UINT16_MAX;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* Updates the widgets of a vehicle which contains the order-data
|
||||
|
||||
Reference in New Issue
Block a user