diff options
Diffstat (limited to 'src/saveload')
-rw-r--r-- | src/saveload/afterload.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/saveload/afterload.cpp b/src/saveload/afterload.cpp index 17ac9bc81..fe99e3c3e 100644 --- a/src/saveload/afterload.cpp +++ b/src/saveload/afterload.cpp @@ -2564,6 +2564,9 @@ bool AfterLoadGame() FOR_ALL_VEHICLES(v) { if (!v->IsPrimaryVehicle()) continue; + /* Older versions are less strict with indices being in range and fix them on the fly */ + if (v->cur_auto_order_index >= v->GetNumOrders()) v->cur_auto_order_index = 0; + v->cur_real_order_index = v->cur_auto_order_index; v->UpdateRealOrderIndex(); } |