Complete.Org: Mailing Lists: Archives: freeciv-dev: October 1999:
[Freeciv-Dev] Re: Specials near rivers
Home

[Freeciv-Dev] Re: Specials near rivers

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: Jeff Mallatt <jjm@xxxxxxxxxxxx>
Cc: freeciv-dev@xxxxxxxxxxx
Subject: [Freeciv-Dev] Re: Specials near rivers
From: Jerzy Klek <qpkjeek@xxxxxxxxxxxxxxx>
Date: Thu, 21 Oct 1999 09:55:08 +0200 (MET DST)

> That will work, but in this context, I think there are really only two
> "specials" (S_SPECIAL_1 and S_SPECIAL_2).  So, how about:
> 
> diff -ru FreecivCVS/common/map.c freeciv/common/map.c
> --- FreecivCVS/common/map.c   Mon Oct  4 11:16:50 1999
> +++ freeciv/common/map.c      Wed Oct 20 14:00:00 1999
> @@ -443,7 +443,7 @@
>    int x1,y1;
>    for (x1=x-1;x1<x+2;x1++)
>      for (y1=y-1;y1<=y+2;y1++) 
> -      if(map_get_tile(x1,y1)->special)
> +      if(map_get_tile(x1,y1)->special&(S_SPECIAL_1 | S_SPECIAL_2))
>       return 1;
>    return 0;
>  }

This is exactly what is needed... Other specials did not matter
here because they are added later, but if it happens again that
there will be another terrain special added, the problem would
reappear with my proposition.

Hmm, stable version out, development needs to go on...

/Jerzy



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