Mercurial > hg > openttd
changeset 15574:b75772da65d4 draft
(svn r20234) -Fix [FS#3988]: refit costs from refit orders are subtracted from the vehicle yearly income
author | yexo <yexo@openttd.org> |
---|---|
date | Wed, 28 Jul 2010 14:18:58 +0000 |
parents | 6d6ca3b52874 |
children | ea0bfd23ad10 |
files | src/vehicle.cpp |
diffstat | 1 files changed, 5 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/src/vehicle.cpp +++ b/src/vehicle.cpp @@ -1131,8 +1131,11 @@ 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()); + } } }