Complete.Org: Mailing Lists: Archives: freeciv-dev: May 2002:
[Freeciv-Dev] Re: Freecost Calculation (PR#1262)
Home

[Freeciv-Dev] Re: Freecost Calculation (PR#1262)

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: Raahul Kumar <raahul_da_man@xxxxxxxxx>
Cc: Christian Knoke <ChrisK@xxxxxxxx>, freeciv-dev@xxxxxxxxxxx, bugs@xxxxxxxxxxxxxxxxxxx
Subject: [Freeciv-Dev] Re: Freecost Calculation (PR#1262)
From: Raimar Falke <hawk@xxxxxxxxxxxxxxxxxxxxxxx>
Date: Thu, 9 May 2002 18:41:11 +0200
Reply-to: rf13@xxxxxxxxxxxxxxxxxxxxxx

On Thu, May 09, 2002 at 07:01:50AM -0700, Raahul Kumar wrote:
> 
> --- Raimar Falke <hawk@xxxxxxxxxxxxxxxxxxxxxxx> wrote:
> > On Tue, Feb 12, 2002 at 10:59:14AM -0800, Christian Knoke wrote:
> > > CVS 12 FEB 2002
> > > 
> > > After set freecost 20, when I have research = 0/10 and
> > > move into a hut and get a tech for free, then research
> > > is set to -4/20 instead of -2/20 IMHO. Obviously it is
> > > calculated from the next search goal (=20) instead of from 
> > > the actual search goal (=10).
> > > 
> > > This is unfair (tm). Starting with 9/10, and freecost=100,
> > > a free tech ends up in -11/20, which means a penalty
> > > of 145 % (not tested, though)
> > 
> > Attached is the fix which move all free cost reduction in front of the
> > get_new_tech calls. It is tested.
> 
> You missed a few other cases where you obtain free techs. The Great Library
> 
> http://www.freeciv.org/lxr/source/server/plrhand.c?v=cvs#L139

The do_free_cost call is already in front.

> Darwins 
> 
> http://www.freeciv.org/lxr/source/server/cityturn.c?v=cvs#L977

The patch fixes this.

        Raimar

-- 
 email: rf13@xxxxxxxxxxxxxxxxx
 "Like the ad says, at 300 dpi you can tell she's wearing a
  swimsuit. At 600 dpi you can tell it's wet. At 1200 dpi you
  can tell it's painted on. I suppose at 2400 dpi you can tell
  if the paint is giving her a rash."
    -- Joshua R. Poulson


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