@@ -2077,13 +2077,12 @@ CommandCost CmdRefitRailVehicle(TileInde
case CT_MAIL:
case CT_GOODS: amount /= 2; break;
default: amount /= 4; break;
}
if (amount != 0) {
if (new_cid != v->cargo_type) {
cost.AddCost(GetRefitCost(v->engine_type));
num += amount;
if (flags & DC_EXEC) {
@@ -2093,13 +2092,12 @@ CommandCost CmdRefitRailVehicle(TileInde
v->cargo_subtype = new_subtype;
InvalidateWindow(WC_VEHICLE_DETAILS, v->index);
InvalidateWindow(WC_VEHICLE_DEPOT, v->tile);
InvalidateWindowClassesData(WC_TRAINS_LIST, 0);
} while ((v = v->Next()) != NULL && !only_this);
_returned_refit_capacity = num;
/* Update the train's cached variables */
if (flags & DC_EXEC) TrainConsistChanged(GetVehicle(p1)->First(), false);