[Freeciv-Dev] Tech cost patch v15 (PR#1082)
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
On Sun, Dec 09, 2001 at 01:19:04PM +0200, Juha Litola wrote:
> On Sat, Dec 08, 2001 at 07:12:51PM +0100, Reinier Post wrote:
>
> > + if(req[tech]++ || get_invention(pplayer, tech) == TECH_KNOWN)
> > + return 0;
> Mark this technology as requirement in requirement array. If this
> was marked as requirement before in recursive search, assign no
> extra requirement. Also if technology is already known, it shouldn't
> be added as requirement.
This line indeed had a bug. Increment should happen later so it should
read:
+ if(req[tech] || get_invention(pplayer, tech) == TECH_KNOWN)
+ return 0;
+
+ req[tech]++;
I misread the code in aitech.c find_prerequisites, this is how
it does checking. This bug had no effect on gameplay, but this
is correct way.
v15 included.
--
// Juha Litola
tech_cost_style15.diff.gz
Description: Binary data
pgpT2naw84yzJ.pgp
Description: PGP signature
- [Freeciv-Dev] Tech cost patch v13 (PR#1082), Juha Litola, 2001/12/01
- [Freeciv-Dev] Re: Tech cost patch v13 (PR#1082), Per I. Mathisen, 2001/12/01
- [Freeciv-Dev] Re: Tech cost patch v13 (PR#1082), Juha Litola, 2001/12/05
- [Freeciv-Dev] Tech cost patch v14 (PR#1082), Juha Litola, 2001/12/08
- [Freeciv-Dev] Re: Tech cost patch v14 (PR#1082), Reinier Post, 2001/12/08
- [Freeciv-Dev] Re: Tech cost patch v14 (PR#1082), Juha Litola, 2001/12/09
- [Freeciv-Dev] Tech cost patch v15 (PR#1082),
Juha Litola <=
- [Freeciv-Dev] Re: Tech cost patch v15 (PR#1082), Raimar Falke, 2001/12/13
- [Freeciv-Dev] Tech cost patch v16 (PR#1082), Juha Litola, 2001/12/13
- [Freeciv-Dev] Re: Tech cost patch v16 (PR#1082), Reinier Post, 2001/12/13
- [Freeciv-Dev] Re: Tech cost patch v16 (PR#1082), Juha Litola, 2001/12/13
- [Freeciv-Dev] Re: Tech cost patch v16 (PR#1082), Reinier Post, 2001/12/14
- [Freeciv-Dev] Re: Tech cost patch v16 (PR#1082), Raimar Falke, 2001/12/13
- [Freeciv-Dev] Re: Tech cost patch v16 (PR#1082), Raimar Falke, 2001/12/16
- [Freeciv-Dev] Re: Tech cost patch v16 (PR#1082), Juha Litola, 2001/12/16
- [Freeciv-Dev] Re: Tech cost patch v14 (PR#1082), Reinier Post, 2001/12/09
- [Freeciv-Dev] Re: Tech cost patch v14 (PR#1082), Juha Litola, 2001/12/09
|
|