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

@@ -386,10 +386,8 @@ void DrawOrderString(const Vehicle *v, const Order *order, int order_index, int
*/
static Order GetOrderCmdFromTile(const Vehicle *v, TileIndex tile)
{
/* Hack-ish; unpack order 0, so everything gets initialised with either zero
* or a suitable default value for the variable. Then also override the index
* as it is not coming from a pool, so would be initialised. */
Order order(0);
/* Override the index as it is not coming from a pool, so would not be initialised correctly. */
Order order;
order.index = 0;
/* check depot first */