Re: [Freeciv-Dev] pollution placement bug (PR#71)
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
At 1999/07/29 21:38 , David Pfitzner wrote:
>Jeff Mallatt wrote:
>> + /* place pollution somewhere in city radius */
>> x=pcity->x+myrand(5)-2;
>> y=pcity->y+myrand(5)-2;
>> + if ( (x==-2 && y==-2) || (x==-2 && y==2) ||
>> + (x==2 && y==-2) || (x==2 && y==2) )
>> + continue;
>
>Um, the above doesn't work :-)
>Eg, should add pcity->x,y _after_ checking for the corners.
Arrgghh! Of course. (I hate it when I'm that stupid.)
>Also, your patch makes pollution show up on top of units, which
>looks very strange. And it doesn't show pollution on cities if
>the transparent flags client option is turned off.
>
>I suspect it would be easiest to fix these by putting the
>code to show pollution on top of a city inside put_city_pixmap();
>could then also make the "city unhappy" tile go over the top
>of pollution, which would make sense to me.
>(Plus put pollution on non-city tiles in pixmap_put_tile(),
>but before putting the unit.)
Yup. This looks like it'll work fine.
jjm
|
|