Fix vehicles with no cargo being shown with last cargo in build window

pull/436/head
Jonathan G Rennison 2 years ago
parent e39962871f
commit fdf2d3dfe1

@ -1465,6 +1465,7 @@ struct BuildVehicleWindow : BuildVehicleWindowBase {
if (!e->CanCarryCargo()) {
this->te.cost = 0;
this->te.cargo = CT_INVALID;
this->te.all_capacities.Clear();
return;
}
@ -2248,6 +2249,7 @@ struct BuildVehicleWindowTrainAdvanced final : BuildVehicleWindowBase {
if (!e->CanCarryCargo()) {
state.te.cost = 0;
state.te.cargo = CT_INVALID;
state.te.all_capacities.Clear();
return;
}

Loading…
Cancel
Save