Complete.Org: Mailing Lists: Archives: freeciv-dev: March 2002:
[Freeciv-Dev] Re: [Bug][Patch] The most peaceful AI ever. (PR#1342)
Home

[Freeciv-Dev] Re: [Bug][Patch] The most peaceful AI ever. (PR#1342)

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: Gregory Berkolaiko <Gregory.Berkolaiko@xxxxxxxxxxxx>, freeciv-dev@xxxxxxxxxxx
Cc: bugs@xxxxxxxxxxxxxxxxxxx
Subject: [Freeciv-Dev] Re: [Bug][Patch] The most peaceful AI ever. (PR#1342)
From: Raahul Kumar <raahul_da_man@xxxxxxxxx>
Date: Sun, 24 Mar 2002 19:52:23 -0800 (PST)

--- Gregory Berkolaiko <Gregory.Berkolaiko@xxxxxxxxxxxx> wrote:
> Actually, it quite a laugh to watch...
> 
> Anyway, AI wouldn't build any AI units anymore.

Good for easy mode - tongue in cheek.

> The reason?  Well, somebody didn't test his patches against old 
> savegames...
> 
> More precisely, list of simple military unit types (for the use by 
> AI) appears to be empty.
> 
> Patch fixing this problem is attached.
> 
> Best,
> G.
> > ? auto.rc
> ? saves
> ? data/classic/Makefile
> Index: ai/aiunit.c
> ===================================================================
> RCS file: /home/freeciv/CVS/freeciv/ai/aiunit.c,v
> retrieving revision 1.189
> diff -u -6 -r1.189 aiunit.c
> --- ai/aiunit.c       2002/03/21 20:57:28     1.189
> +++ ai/aiunit.c       2002/03/24 19:38:37
> @@ -2592,16 +2592,16 @@
>  **************************************************************************/
>  void update_simple_ai_types(void)
>  {
>    int i = 0;
>  
>    unit_type_iterate(id) {
> -    if (unit_type_exists(i) && !unit_type_flag(i, F_NONMIL)
> -     && !unit_type_flag(i, F_MISSILE)
> -     && !unit_type_flag(i, F_NO_LAND_ATTACK)
> -     && get_unit_type(i)->transport_capacity < 8) {
> +    if (unit_type_exists(id) && !unit_type_flag(id, F_NONMIL)
> +     && !unit_type_flag(id, F_MISSILE)

What have you got against missiles? The code for handling missiles should be
exactly the same as air units.

> +     && !unit_type_flag(id, F_NO_LAND_ATTACK)
> +     && get_unit_type(id)->transport_capacity < 8) {

No aircraft carriers. Too hard to handle?



__________________________________________________
Do You Yahoo!?
Yahoo! Movies - coverage of the 74th Academy Awards®
http://movies.yahoo.com/


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