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.
This commit is contained in:
Jonathan G Rennison
2018-08-13 01:16:16 +01:00
parent 292025394c
commit a5603b539f

View File

@@ -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 {