1
0
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:
Rubidium
2024-03-26 16:07:03 +01:00
committed by rubidium42
parent 1691b41b54
commit fc7f184dbd
4 changed files with 14 additions and 33 deletions

View File

@@ -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