Complete.Org: Mailing Lists: Archives: freeciv-dev: September 2004:
[Freeciv-Dev] Re: (PR#10008) "net income" is wrong
Home

[Freeciv-Dev] Re: (PR#10008) "net income" is wrong

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: jdorje@xxxxxxxxxxxxxxxxxxxxx
Subject: [Freeciv-Dev] Re: (PR#10008) "net income" is wrong
From: "Marko Lindqvist" <marko.lindqvist@xxxxxxxxxxx>
Date: Sun, 26 Sep 2004 00:11:57 -0700
Reply-to: rt@xxxxxxxxxxx

<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




[Prev in Thread] Current Thread [Next in Thread]