mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2025-03-11 01:49:50 +00:00
(svn r18797) -Fix (r18781): building wagons didn't add them to a train
This commit is contained in:
parent
7aeccb9bd0
commit
66b900215a
@ -1034,7 +1034,7 @@ struct BuildVehicleWindow : Window {
|
||||
case BUILD_VEHICLE_WIDGET_BUILD: {
|
||||
EngineID sel_eng = this->sel_engine;
|
||||
if (sel_eng != INVALID_ENGINE) {
|
||||
CommandCallback *callback = (this->vehicle_type == VEH_TRAIN && RailVehInfo(sel_eng)->railveh_type == RAILVEH_WAGON) ? NULL : CcBuildPrimaryVehicle;
|
||||
CommandCallback *callback = (this->vehicle_type == VEH_TRAIN && RailVehInfo(sel_eng)->railveh_type == RAILVEH_WAGON) ? CcBuildWagon : CcBuildPrimaryVehicle;
|
||||
DoCommandP(this->window_number, sel_eng, 0, GetCmdBuildVeh(this->vehicle_type), callback);
|
||||
}
|
||||
break;
|
||||
|
Loading…
Reference in New Issue
Block a user