Complete.Org: Mailing Lists: Archives: freeciv-dev: November 2001:
[Freeciv-Dev] Re: [PATCH] Re: AI questions
Home

[Freeciv-Dev] Re: [PATCH] Re: AI questions

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: Gregory Berkolaiko <gberkolaiko@xxxxxxxxxxx>
Cc: freeciv-dev@xxxxxxxxxxx
Subject: [Freeciv-Dev] Re: [PATCH] Re: AI questions
From: Petr Baudis <pasky@xxxxxxxxxxx>
Date: Sat, 24 Nov 2001 23:15:44 +0100

> > Do we need to re-generate warmap in part three? I would remove it, as
> > it looks
> > only as wasting CPU time for me, the map shouldn't change while
> > executing
> > that function. What do you think?
> 
> I think that the map doesn't change but your location might.
> And if you are in the same location then the warmap is cached.
Aha, if it's cached then it's ok.

> >    x = punit->x; y = punit->y;
> > -  if (is_ground_unit(punit)) con = map_get_continent(x, y);
> > -  else con = 0; /* Thanks, Tony */
> > +  if (is_ground_unit(punit)) continent = map_get_continent(x, y);
> > +  else continent = 0; /* ships don't care about continents */
>                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> I am not sure this comment is correct
Why? They explore just water, that's clear even from that statement.

> > +      /* We won't travel to another continents or into foreign
> 
> "another continent" or "other continents"
Ok :-)

At http://pasky.ji.cz/~pasky/dev/freeciv/ there's this patch with the english
corrected. And with one condition corrected, otherwise we end in infinite loop.
I really promise I will start testing my patches before submitting them just
now, as it looks it is really neccessary. With the patch actually lying there
(i won't at least flood you with tons of various buggy versions of one patch
;-), I managed to run at least [rand]seed=42 aifill=8 autogame with no probs
to the year -250, I will let it run during night.

-- 

                                Petr "Pasky" Baudis

UN*X programmer, UN*X administrator, hobbies = IPv6, IRC
Real Users hate Real Programmers.
Public PGP key, geekcode and stuff: http://pasky.ji.cz/~pasky/


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