diff options
author | peter1138 <peter1138@openttd.org> | 2019-02-28 21:32:08 +0000 |
---|---|---|
committer | PeterN <peter@fuzzle.org> | 2019-03-24 15:28:48 +0000 |
commit | d54b6ac09b6fe88c09f7886739fe9c05f16b8222 (patch) | |
tree | f2da295763b43c7661a12a2727319487491843d4 /src/autoreplace_cmd.cpp | |
parent | f6264e5212575e63f02cb0741e7188ff0d154fac (diff) | |
download | openttd-d54b6ac09b6fe88c09f7886739fe9c05f16b8222.tar.xz |
Feature: When filtering purchase list by cargo type, make buy button perform a refit if required.
Diffstat (limited to 'src/autoreplace_cmd.cpp')
-rw-r--r-- | src/autoreplace_cmd.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/autoreplace_cmd.cpp b/src/autoreplace_cmd.cpp index 95568e381..7a8a7fefd 100644 --- a/src/autoreplace_cmd.cpp +++ b/src/autoreplace_cmd.cpp @@ -294,7 +294,7 @@ static CommandCost BuildReplacementVehicle(Vehicle *old_veh, Vehicle **new_vehic if (refit_cargo == CT_INVALID) return CommandCost(); // incompatible cargoes /* Build the new vehicle */ - cost = DoCommand(old_veh->tile, e, 0, DC_EXEC | DC_AUTOREPLACE, GetCmdBuildVeh(old_veh)); + cost = DoCommand(old_veh->tile, e | (CT_INVALID << 24), 0, DC_EXEC | DC_AUTOREPLACE, GetCmdBuildVeh(old_veh)); if (cost.Failed()) return cost; Vehicle *new_veh = Vehicle::Get(_new_vehicle_id); |