From 9c5a7d3a572d02813e6bab83004334b9a154a62b Mon Sep 17 00:00:00 2001 From: stormcone <48624099+stormcone@users.noreply.github.com> Date: Thu, 11 Mar 2021 21:40:48 +0100 Subject: Fix #8733: Can't buy train engine when the "Engines only" filter is active --- src/build_vehicle_gui.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/build_vehicle_gui.cpp b/src/build_vehicle_gui.cpp index 58d6ea4e6..a7a7d8042 100644 --- a/src/build_vehicle_gui.cpp +++ b/src/build_vehicle_gui.cpp @@ -1472,7 +1472,7 @@ struct BuildVehicleWindow : Window { if (sel_eng != INVALID_ENGINE) { CommandCallback *callback = (this->vehicle_type == VEH_TRAIN && RailVehInfo(sel_eng)->railveh_type == RAILVEH_WAGON) ? CcBuildWagon : CcBuildPrimaryVehicle; CargoID cargo = this->cargo_filter[this->cargo_filter_criteria]; - if (cargo == CF_ANY) cargo = CF_NONE; + if (cargo == CF_ANY || cargo == CF_ENGINES) cargo = CF_NONE; DoCommandP(this->window_number, sel_eng | (cargo << 24), 0, GetCmdBuildVeh(this->vehicle_type), callback); } break; -- cgit v1.2.3-70-g09d2