[Freeciv-Dev] Re: (PR#10008) "net income" is wrong
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
<URL: http://rt.freeciv.org/Ticket/Display.html?id=10008 >
Jason Short wrote:
>
> Jason Short wrote:
>>
>>My "net income" (found by clicking on the panel in the gtk2 client) is
>>listed as +11 per turn. But I find I actually get about +50 per turn.
>
> The reason is that player_get_expected_income is awful. This fixes it
> (I think).
>
> + income += city_gold_surplus(pcity, pcity->tax_total);
Have all callers made sure that 'pcity->tax_total' is up to date?
Otherwise this call is inconsistent at least; 'pcity->tax_total' (city
workers/specialists/traderoutes/government/taxrates) reflect to last
turn but rest of the city_gold_surplus() is calculated according to
current situation (improvements/units).
Same problem applies, to lesser extend, to old code you are replacing
too. It does call get_tax_income(), but does so using old
'pcity->trade_prod' value.
- Caz
|
|