From a5603b539f7d32328af5a5e7e261bcee2fed01da Mon Sep 17 00:00:00 2001 From: Jonathan G Rennison Date: Mon, 13 Aug 2018 01:16:16 +0100 Subject: [PATCH] Fix order extra data/flags copying conditions in Order::AssignOrder Data/flags were not copied to vehicle current_orders if cargo-type load/unload was not being used. --- src/order_cmd.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/order_cmd.cpp b/src/order_cmd.cpp index c68067b166..ac0c0bd676 100644 --- a/src/order_cmd.cpp +++ b/src/order_cmd.cpp @@ -330,7 +330,7 @@ void Order::AssignOrder(const Order &other) this->travel_time = other.travel_time; this->max_speed = other.max_speed; - if ((this->GetUnloadType() == OUFB_CARGO_TYPE_UNLOAD || this->GetLoadType() == OLFB_CARGO_TYPE_LOAD) && other.extra != NULL) { + if (other.extra != NULL && (this->GetUnloadType() == OUFB_CARGO_TYPE_UNLOAD || this->GetLoadType() == OLFB_CARGO_TYPE_LOAD || other.extra->xdata != 0 || other.extra->xflags != 0)) { this->AllocExtraInfo(); *(this->extra) = *(other.extra); } else {