[Freeciv-Dev] Re: (PR#3776) Goto sees ZOC but ignores it
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
On Tue, 15 Jul 2003, Jason Short wrote:
> Gregory Berkolaiko wrote:
> >
> > Please try the attached patch. Well, actually I have tried it already
> > and it works. But maybe you can find other cases where a fix is needed.
> >
> > Note: fogged cities are considered occupied for the purposes of ZoC.
> > Hopefully this resolves 3387 as well.
>
> > + pcity = is_non_allied_city_tile(ptile, pplayer);
> > + if (pcity && (pcity->occupied || tile_get_known(x1, y1) !=
> > TILE_KNOWN)) {
> > + /* If the city is fogged, we assume it's occupied */
> > + return FALSE;
> > + }
>
> I think you mean "seen" here, not "known". Perhaps tile_is_known_and_seen?
No, the code is correct. Remember, we are in the client here. By
tile_is_known_and_seen you probably mean map_get_known_and_seen (strangely
returning bool), but it is in the server.
In the client we have tile_get_known which returns
enum known_type {
TILE_UNKNOWN, TILE_KNOWN_FOGGED, TILE_KNOWN
};
So everything is ship shape and Bristol fashion.
Although for better readability I can substitute "!= TILE_KNOWN" with
"== TILE_KNOWN_FOGGED".
G.
[Freeciv-Dev] Re: (PR#3776) Goto sees ZOC but ignores it, Gregory Berkolaiko, 2003/07/16
[Freeciv-Dev] Re: (PR#3776) Goto sees ZOC but ignores it, Gregory Berkolaiko, 2003/07/16
|
|