[Freeciv-Dev] Re: [RFC] Behaviour of units in eXplore mode near cities
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
--- Raimar Falke <hawk@xxxxxxxxxxxxxxxxxxxxxxx> wrote:
> On Sat, Feb 16, 2002 at 08:24:49PM +0100, Petr Baudis wrote:
> > Hi,
> >
> > There's one problem I discovered while cleaning up
> ai_manage_explorer(), but
> > its solution would require possible behaviour change, so I left it in
> that time
> > just with one FIXME dropped. The code piece is:
> >
> > /* We won't travel into cities, unless we are able to do so -
> diplomats
> > * and caravans can. */
> > /* FIXME/TODO: special flag for this? --pasky */
> > /* FIXME: either comment or code is wrong here :-) --pasky */
> > if (map_get_city(x1, y1) && (unit_flag(punit, F_DIPLOMAT) ||
> > unit_flag(punit, F_CARAVAN)))
> > continue;
> >
> > As obvious, the comment and the actual code differs, they even
> contradict.
> > And I wonder which behaviour makes more sense and is more correct -
> to NOT
> > EVADE enter cities when we are diplomat or caravan, or to EVADE
> cities. The
> > "not evade" behaviour appeared as obvious to me so I wrote that
> comment, but
> > then when I rewrote the if and sliced the ifs, negating the
> conditions...
>
> I would suggest changing the comment to something like:
> Traveling into cities is special for diplomats and caravans. So skip
> them.
Eh?
I didn't quite understand what Petr said but I think the code is wrong.
There should be ! before testing for flags...
__________________________________________________
Do You Yahoo!?
Everything you'll ever need on one web page
from News and Sport to Email and Music Charts
http://uk.my.yahoo.com
- [Freeciv-Dev] [RFC] Behaviour of units in eXplore mode near cities, Petr Baudis, 2002/02/16
- [Freeciv-Dev] Re: [RFC] Behaviour of units in eXplore mode near cities, Raimar Falke, 2002/02/17
- [Freeciv-Dev] Re: [RFC] Behaviour of units in eXplore mode near cities,
Gregory Berkolaiko <=
- [Freeciv-Dev] Re: [RFC] Behaviour of units in eXplore mode near cities, Raimar Falke, 2002/02/17
- [Freeciv-Dev] Re: [RFC] Behaviour of units in eXplore mode near cities, Gregory Berkolaiko, 2002/02/17
- [Freeciv-Dev] Re: [RFC] Behaviour of units in eXplore mode near cities, Raimar Falke, 2002/02/17
- [Freeciv-Dev] Re: [RFC] Behaviour of units in eXplore mode near cities, Petr Baudis, 2002/02/17
- [Freeciv-Dev] Re: [RFC] Behaviour of units in eXplore mode near cities, Raimar Falke, 2002/02/18
- [Freeciv-Dev] Re: [RFC] Behaviour of units in eXplore mode near cities, Gregory Berkolaiko, 2002/02/18
- [Freeciv-Dev] Re: [RFC] Behaviour of units in eXplore mode near cities, Raimar Falke, 2002/02/18
- [Freeciv-Dev] Re: [RFC] Behaviour of units in eXplore mode near cities, Petr Baudis, 2002/02/20
- [Freeciv-Dev] Re: [RFC] Behaviour of units in eXplore mode near cities, Mike Kaufman, 2002/02/20
- [Freeciv-Dev] Re: [RFC] Behaviour of units in eXplore mode near cities, Petr Baudis, 2002/02/20
|
|