Complete.Org: Mailing Lists: Archives: freeciv-dev: December 2004:
[Freeciv-Dev] (PR#11300) bad use of effects in base_get_xxx_tile?
Home

[Freeciv-Dev] (PR#11300) bad use of effects in base_get_xxx_tile?

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
Subject: [Freeciv-Dev] (PR#11300) bad use of effects in base_get_xxx_tile?
From: "Jason Short" <jdorje@xxxxxxxxxxxxxxxxxxxxx>
Date: Thu, 2 Dec 2004 02:39:09 -0800
Reply-to: rt@xxxxxxxxxxx

<URL: http://rt.freeciv.org/Ticket/Display.html?id=11300 >

In the three base_get_xxx_tile functions there are the following lines:

     s += get_city_tile_bonus(pcity, ptile, EFT_PROD_ADD_TILE);
       s += get_city_tile_bonus(pcity, ptile, EFT_PROD_INC_TILE);
     s += (s * get_city_tile_bonus(pcity, ptile, EFT_PROD_PER_TILE)) / 100;


     t += get_city_tile_bonus(pcity, ptile, EFT_TRADE_ADD_TILE);
       t += get_city_bonus(pcity, EFT_TRADE_INC_TILE);
     t += (t * get_city_tile_bonus(pcity, ptile, EFT_TRADE_PER_TILE)) / 100;


     f += get_city_tile_bonus(pcity, &tile, EFT_FOOD_ADD_TILE);
       f += get_city_bonus(pcity, EFT_FOOD_INC_TILE);
     f += (f * get_city_tile_bonus(pcity, &tile, EFT_FOOD_PER_TILE) / 100);

It seems obvious enough that the get_city_bonus() checks are wrong.  All 
these checks should be get_city_tile_bonus().  This means 
EFT_FOOD_INC_TILE and EFT_TRADE_INC_TILE with a terrain or special req 
won't work.

-jason





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