Complete.Org: Mailing Lists: Archives: freeciv-dev: March 2002:
[Freeciv-Dev] Re: can_player_build_air_units_at_all
Home

[Freeciv-Dev] Re: can_player_build_air_units_at_all

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: Gregory Berkolaiko <Gregory.Berkolaiko@xxxxxxxxxxxx>
Cc: freeciv-dev@xxxxxxxxxxx
Subject: [Freeciv-Dev] Re: can_player_build_air_units_at_all
From: Raimar Falke <hawk@xxxxxxxxxxxxxxxxxxxxxxx>
Date: Fri, 1 Mar 2002 20:40:13 +0100
Reply-to: rf13@xxxxxxxxxxxxxxxxxxxxxx

On Fri, Mar 01, 2002 at 06:56:47PM +0000, Gregory Berkolaiko wrote:
> On Fri, 1 Mar 2002, Raimar Falke wrote:
> 
> > On Fri, Mar 01, 2002 at 03:28:59PM +0000, Gregory Berkolaiko wrote:
> > > On Thu, 28 Feb 2002, Raimar Falke wrote:
> > > > 
> > > > In update_research:
> > > >  pplayer->ai.player_can_build_air_units = FALSE
> > > >  for all unit types:
> > > >    if can build unit type and unit type is air unit:
> > > >      pplayer->ai.player_can_build_air_units = TRUE
> > > 
> 
> [...]
> 
> > > Discovery of the first technology to enable flying units is an ugly 
> > > criterium 
> > 
> > > as it would involve unit_iterate every time a discovery is made
> > > (although this is how help text functions).
> > 
> > This may not be the fastest solution but a robust one.
> 
> The slowest and the most bothersome.  You have to save the 
> pplayer->ai.player_can_build_air_units, load it, initialise it and update 
> it every time you discover something new.  no fun.

update_research is called after a player is loaded. No extra problems.

        Raimar

-- 
 email: rf13@xxxxxxxxxxxxxxxxx
 1 + 1 = 3, for large values of 1


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