Codechange: Use anonymous union for vehicle orders/old orders list
This commit is contained in:
@@ -1382,7 +1382,7 @@ CommandCost CmdSellRailWagon(DoCommandFlag flags, Vehicle *t, bool sell_chain, b
|
||||
return ret;
|
||||
}
|
||||
|
||||
if (first->orders.list == nullptr && !OrderList::CanAllocateItem()) {
|
||||
if (first->orders == nullptr && !OrderList::CanAllocateItem()) {
|
||||
/* Restore the train we had. */
|
||||
RestoreTrainBackup(original);
|
||||
return_cmd_error(STR_ERROR_NO_MORE_SPACE_FOR_ORDERS);
|
||||
@@ -1399,7 +1399,7 @@ CommandCost CmdSellRailWagon(DoCommandFlag flags, Vehicle *t, bool sell_chain, b
|
||||
if (v == first && v->IsEngine() && !sell_chain && new_head != nullptr && new_head->IsFrontEngine()) {
|
||||
/* We are selling the front engine. In this case we want to
|
||||
* 'give' the order, unit number and such to the new head. */
|
||||
new_head->orders.list = first->orders.list;
|
||||
new_head->orders = first->orders;
|
||||
new_head->AddToShared(first);
|
||||
DeleteVehicleOrders(first);
|
||||
|
||||
|
Reference in New Issue
Block a user