Complete.Org: Mailing Lists: Archives: freeciv-dev: December 2001:
[Freeciv-Dev] Re: [PATCH] base_real_map_distance (PR#1049)
Home

[Freeciv-Dev] Re: [PATCH] base_real_map_distance (PR#1049)

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: Petr Baudis <pasky@xxxxxxxxxxx>
Cc: jdorje@xxxxxxxxxxxxxxxxxxxxx, freeciv-dev@xxxxxxxxxxx, bugs@xxxxxxxxxxxxxxxxxxx
Subject: [Freeciv-Dev] Re: [PATCH] base_real_map_distance (PR#1049)
From: Raimar Falke <hawk@xxxxxxxxxxxxxxxxxxxxxxx>
Date: Sun, 2 Dec 2001 23:19:38 +0100
Reply-to: rf13@xxxxxxxxxxxxxxxxxxxxxx

On Sun, Dec 02, 2001 at 08:36:01PM +0100, Petr Baudis wrote:
> Hi,
> 
>   sorry I respond to so old mail, however I didn't find the patch which
> just got into CVS here and this is only mail where I discovered this change.
> I just had a look what changed in the code I actually clean, and basically 
> following:
> 
> > Index: server/settlers.c
> > ===================================================================
> > RCS file: /home/freeciv/CVS/freeciv/server/settlers.c,v
> > retrieving revision 1.112
> > diff -u -r1.112 settlers.c
> > --- server/settlers.c       2001/10/14 21:02:17     1.112
> > +++ server/settlers.c       2001/11/01 14:09:33
> > @@ -769,8 +769,8 @@
> >    for (i = 0; i < game.nplayers; i++) {
> >      city_list_iterate(game.players[i].cities, pcity) {
> >        if (map_distance(x, y, pcity->x, pcity->y)<=8) {
> > -        dx = xdist(pcity->x, x);
> > -        dy = ydist(pcity->y, y);
> > +   base_real_map_distance(&dx, &dy, pcity->x, pcity->y, x, y);
> > +   dx = abs(dx), dy = abs(dy);
> >     /* these are heuristics... */
> >          if (dx<=5 && dy<5)
> >            return 0;
> 
> Thing I have problem with is:
> +     dx = abs(dx), dy = abs(dy);
> I think it should be rather
> +     dx = abs(dx); dy = abs(dy);
> What do you think?

Another point for the style guide.

        Raimar

-- 
 email: rf13@xxxxxxxxxxxxxxxxx
 "I haven't lost my mind - it's backed up on tape somewhere."


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