From eab5db97692c82afc11465887c9a16f698461ed4 Mon Sep 17 00:00:00 2001 From: Jonathan G Rennison Date: Thu, 11 Jul 2019 18:46:48 +0100 Subject: [PATCH] Fix corruption of conditional order targets when loading SpringPP savegames --- src/saveload/afterload.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/saveload/afterload.cpp b/src/saveload/afterload.cpp index 23e23f159a..55976e9dc9 100644 --- a/src/saveload/afterload.cpp +++ b/src/saveload/afterload.cpp @@ -3464,7 +3464,9 @@ bool AfterLoadGame() /* convert wait for cargo orders to ordinary load if possible */ Order *order; FOR_ALL_ORDERS(order) { - if (order->GetLoadType() == static_cast(1)) order->SetLoadType(OLF_LOAD_IF_POSSIBLE); + if ((order->IsType(OT_GOTO_STATION) || order->IsType(OT_LOADING) || order->IsType(OT_IMPLICIT)) && order->GetLoadType() == static_cast(1)) { + order->SetLoadType(OLF_LOAD_IF_POSSIBLE); + } } }