mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2025-06-18 19:19:29 +01:00
Fix 0455627d16
: Order backups were no longer created when selling vehicles. (#14352)
This commit is contained in:
parent
c702e05517
commit
f2318c35db
@ -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 {
|
||||
|
Loading…
Reference in New Issue
Block a user