summaryrefslogtreecommitdiff
path: root/src/order_backup.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/order_backup.cpp')
-rw-r--r--src/order_backup.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/order_backup.cpp b/src/order_backup.cpp
index 39f9c5d36..78091d97b 100644
--- a/src/order_backup.cpp
+++ b/src/order_backup.cpp
@@ -44,7 +44,7 @@ OrderBackup::OrderBackup(const Vehicle *v, uint32 user)
{
this->user = user;
this->tile = v->tile;
- this->orderindex = v->cur_order_index;
+ this->orderindex = v->cur_auto_order_index;
this->group = v->group_id;
this->service_interval = v->service_interval;
@@ -87,7 +87,10 @@ void OrderBackup::DoRestore(Vehicle *v)
}
uint num_orders = v->GetNumOrders();
- if (num_orders != 0) v->cur_order_index = this->orderindex % num_orders;
+ if (num_orders != 0) {
+ v->cur_real_order_index = v->cur_auto_order_index = this->orderindex % num_orders;
+ v->UpdateRealOrderIndex();
+ }
v->service_interval = this->service_interval;
/* Restore vehicle group */