@@ -2077,27 +2077,25 @@ 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) {
v->cargo.Truncate((v->cargo_type == new_cid) ? amount : 0);
v->cargo_type = new_cid;
v->cargo_cap = amount;
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;