summaryrefslogtreecommitdiff
path: root/openttd.c
diff options
context:
space:
mode:
Diffstat (limited to 'openttd.c')
-rw-r--r--openttd.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/openttd.c b/openttd.c
index eb54886cd..ee2b0234b 100644
--- a/openttd.c
+++ b/openttd.c
@@ -1518,5 +1518,21 @@ bool AfterLoadGame(void)
}
}
+ /* Setting no refit flags to all orders in savegames from before refit in orders were added */
+ if (CheckSavegameVersion(36)) {
+ Order *order;
+ Vehicle *v;
+
+ FOR_ALL_ORDERS(order) {
+ order->refit_cargo = CT_NO_REFIT;
+ order->refit_subtype = CT_NO_REFIT;
+ }
+
+ FOR_ALL_VEHICLES(v) {
+ v->current_order.refit_cargo = CT_NO_REFIT;
+ v->current_order.refit_subtype = CT_NO_REFIT;
+ }
+ }
+
return true;
}