[Freeciv-Dev] Re: Specials near rivers
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
> 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
|
|