Complete.Org: Mailing Lists: Archives: freeciv-dev: July 2003:
[Freeciv-Dev] Re: (PR#3776) Goto sees ZOC but ignores it
Home

[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]
To: ChrisK@xxxxxxxx
Subject: [Freeciv-Dev] Re: (PR#3776) Goto sees ZOC but ignores it
From: "Gregory Berkolaiko" <Gregory.Berkolaiko@xxxxxxxxxxxx>
Date: Wed, 16 Jul 2003 15:15:10 -0700
Reply-to: rt@xxxxxxxxxxxxxx

On Wed, 16 Jul 2003, Jason Short wrote:

> Gregory Berkolaiko wrote:
> > 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.
> 
> OK, I see.  Now I understand what the problem was originally...
> 
> However, this solution is incomplete.  Now for the client goto map we 
> check ZOC.  But any other PF in the client (that uses 
> simple_path_unit_iterator) will still use the server's version by default.

But there are no other PF in the client.

> In other words, the server implementation should be in the server not in 
> the common code.  One alternative might be to have the common-code 
> implementation work for both server and client.  This would be ugly 
> (checking is_server) but at least it would be localized.

I thought about it.  But then I remembered that I wanted AI to ignore ZoC 
of far-away units in the field, which would need a different is_my_zoc 
function and decided to go for a callback.  Also get_ZOC in the client 
calls functions from the client, so it would be hard to move it into 
common.

We can move is_my_zoc from common to server but then we wouldn't be able 
to set it in common/aicore/pf_tools.c ...

G.





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