@@ -77,25 +77,25 @@ void OrderBackup::DoRestore(Vehicle *v)
DoCommand(0, v->index | CO_SHARE << 30, this->clone->index, DC_EXEC, CMD_CLONE_ORDER);
} else if (this->orders != NULL && OrderList::CanAllocateItem()) {
v->orders.list = new OrderList(this->orders, v);
this->orders = NULL;
/* Make sure buoys/oil rigs are updated in the station list. */
InvalidateWindowClassesData(WC_STATION_LIST, 0);
}
v->CopyConsistPropertiesFrom(this);
/* Make sure orders are in range */
v->UpdateRealOrderIndex();
v->cur_implicit_order_index = v->cur_real_order_index;
if (v->cur_implicit_order_index >= v->GetNumOrders()) v->cur_implicit_order_index = v->cur_real_order_index;
/* Restore vehicle group */
DoCommand(0, this->group, v->index, DC_EXEC, CMD_ADD_VEHICLE_GROUP);
/**
* Create an order backup for the given vehicle.
* @param v The vehicle to make a backup of.
* @param user The user that is requesting the backup.
* @note Will automatically remove any previous backups of this user.
*/
/* static */ void OrderBackup::Backup(const Vehicle *v, uint32 user)