# HG changeset patch # User yexo # Date 2010-07-28 14:18:58 # Node ID 40de668411f96b24dc0fc22ef36c268f144c647d # Parent e61b7fdc3ed19bdc2cdf08aa73fbfac78aed14bc (svn r20234) -Fix [FS#3988]: refit costs from refit orders are subtracted from the vehicle yearly income diff --git a/src/vehicle.cpp b/src/vehicle.cpp --- a/src/vehicle.cpp +++ b/src/vehicle.cpp @@ -1131,8 +1131,11 @@ void VehicleEnterDepot(Vehicle *v) SetDParam(0, v->index); AddVehicleNewsItem(STR_NEWS_ORDER_REFIT_FAILED, NS_ADVICE, v->index); } - } else if (v->owner == _local_company && cost.GetCost() != 0) { - ShowCostOrIncomeAnimation(v->x_pos, v->y_pos, v->z_pos, cost.GetCost()); + } else if (cost.GetCost() != 0) { + v->profit_this_year -= cost.GetCost() << 8; + if (v->owner == _local_company) { + ShowCostOrIncomeAnimation(v->x_pos, v->y_pos, v->z_pos, cost.GetCost()); + } } }