Fix corruption of conditional order targets when loading SpringPP savegames

This commit is contained in:
Jonathan G Rennison
2019-07-11 18:46:48 +01:00
parent 4cf60613df
commit eab5db9769

View File

@@ -3464,7 +3464,9 @@ bool AfterLoadGame()
/* convert wait for cargo orders to ordinary load if possible */ /* convert wait for cargo orders to ordinary load if possible */
Order *order; Order *order;
FOR_ALL_ORDERS(order) { FOR_ALL_ORDERS(order) {
if (order->GetLoadType() == static_cast<OrderLoadFlags>(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<OrderLoadFlags>(1)) {
order->SetLoadType(OLF_LOAD_IF_POSSIBLE);
}
} }
} }