Complete.Org: Mailing Lists: Archives: freeciv-dev: November 2001:
[Freeciv-Dev] Re: Safe paths for triremes etc. (PR#1007)

[Freeciv-Dev] Re: Safe paths for triremes etc. (PR#1007)

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: Raahul Kumar <raahul_da_man@xxxxxxxxx>
Cc: freeciv-dev@xxxxxxxxxxx, bugs@xxxxxxxxxxxxxxxxxxx
Subject: [Freeciv-Dev] Re: Safe paths for triremes etc. (PR#1007)
From: Gregory Berkolaiko <gberkolaiko@xxxxxxxxxxx>
Date: Fri, 16 Nov 2001 18:21:13 +0000 (GMT)

 --- Raahul Kumar <raahul_da_man@xxxxxxxxx> wrote:
> --- Gregory Berkolaiko <gberkolaiko@xxxxxxxxxxx> wrote:
> +     * types of units and only one way to generate city's warmap. */
>      if (pcity && pcity == warmap.warcity)
> the above line can't be right. Probably should be just
> if (pcity == warmap.warcity)

no, it is right (and I didn't write it), it means "if pcity and
warmap.warcity are equal and not NULL"

> Name suggestions for 
> else c = SINGLE_MOVE;
> c should be perhaps current_move_cost?

this is in find_a_direction which is one hell of variable naming.
when I understand it thoroughly, I will do something about the names.
but not now.

> For the below AI cheat
> if (pplayer->ai.control) return 1;
> +      square_iterate(x1, y1, 1, x2, y2) {
> Maybe a server option for setting whether the AI respects fog of war?

this is correct thinking.
it should be done (as part of palyer_ai struct, for example)
the only thing is that if not allowed to see under fog, AI will play even
but this is a completely different project and if you want to do it I
will give you all possible assistance (like checking and testing and

> if (punit) {
>      if (is_sailing_unit(punit)) {
> -      init_warmap(punit->x, punit->y, LAND_MOVING);
>        really_generate_warmap(pcity, punit, SEA_MOVING);
>      } else {
> -      init_warmap(punit->x, punit->y, SEA_MOVING);
>        really_generate_warmap(pcity, punit, LAND_MOVING);
>      }
> Is the above really true? Why the hell did we originally generate a
> land moving
> warmap for a sea unit?

this is not generating, it's cleaning up before generating.
it should not be neccessary, if for some reason it causes weird
behaviour, it is a bug.  I remember checking it by comparing savegames
for autogames, they were identical. 

Thanks for looking at the diff,

Do You Yahoo!?
Everything you'll ever need on one web page from News and Sport to Email and 
Music Charts

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