Fix 0455627d16: Order backups were no longer created when selling vehicles. (#14352)

This commit is contained in:
Peter Nelson 2025-06-10 18:03:05 +01:00 committed by GitHub
parent c702e05517
commit f2318c35db
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -247,13 +247,6 @@ CommandCost CmdSellVehicle(DoCommandFlags flags, VehicleID v_id, bool sell_chain
if (!front->IsStoppedInDepot()) return CommandCost(STR_ERROR_TRAIN_MUST_BE_STOPPED_INSIDE_DEPOT + front->type);
/* Can we actually make the order backup, i.e. are there enough orders? */
if (backup_order && front->orders != nullptr && !front->orders->IsShared()) {
/* Only happens in exceptional cases when there aren't enough orders anyhow.
* Thus it should be safe to just drop the orders in that case. */
backup_order = false;
}
if (v->type == VEH_TRAIN) {
ret = CmdSellRailWagon(flags, v, sell_chain, backup_order, client_id);
} else {