Complete.Org:
Mailing Lists:
Archives:
freeciv-dev:
November 2001: [Freeciv-Dev] Re: Tech cost patch v8 |
[Freeciv-Dev] Re: Tech cost patch v8[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
On Fri, Nov 30, 2001 at 08:07:06PM +0100, Raimar Falke wrote: > This isn't valid C: This was c++:ism, I wonder how gcc compiled it. > Replace > + int playerswithtech = 0; > with > + int players_with_tech = 0; Done > Replace > +static int goal_tech_cost_rec(struct player *pplayer, Tech_Type_id goal) Done > + Uses tech_goal to do calculation except with tech_cost_style == 0. > What "tech_goal"? Revision tiredness, didn't notice to update the comment. Should be goal_tech_cost_rec. Fixed. > Why is this special case need for tech_cost_style == 0 in goal_tech_cost? Because costs for civ1 and civ2 style aren't consistent. Cost of technology changes when we research new techs. Following from that, goal_tech_cost just cannot be calculated in the same way as other styles. I made some cleanups to goal_tech_cost and rewrote tech_cost for style 0 to give fastest path estimate for technology. Attached is v11. -- // Juha Litola
tech_cost_style11.diff.gz
pgpMXnWBfKS5V.pgp
|