Complete.Org: Mailing Lists: Archives: freeciv-dev: August 2003:
[Freeciv-Dev] Re: (PR#5113) Strange shared vision
Home

[Freeciv-Dev] Re: (PR#5113) Strange shared vision

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: remi.bonnet@xxxxxxxxxxx
Subject: [Freeciv-Dev] Re: (PR#5113) Strange shared vision
From: "Gregory Berkolaiko" <Gregory.Berkolaiko@xxxxxxxxxxxx>
Date: Fri, 29 Aug 2003 07:18:57 -0700
Reply-to: rt@xxxxxxxxxxxxxx

On Fri, 29 Aug 2003, Jason Short wrote:

> Gregory Berkolaiko wrote:
> > On Thu, 28 Aug 2003, Jason Short wrote:
> > 
> > 
> >>[guest - Sat Aug 16 08:13:16 2003]:
> >>
> >>
> >>>I have an alliance with LLywein. We have have both given shared vision
> >>>to the other but i see only a hole in the fog, not units and not cities.
> >>>
> >>>Attached savegame.
> >>
> >>Ummm....
> >>
> >>It looks to me like shared vision will never reveal units.  I've never
> >>noticed this, but perhaps it's not something easily noticed.  Can anyone
> >>confirm?
> >>
> >>The culprit is the call to map_get_known2 in can_player_see_unit_at
> >>(called by send_unit_info_to_onlookers, among others).  map_get_known2
> >>does not check shared vision!
> > 
> > 
> > I disagree.  Shared vision is done through fog, not through seeing 
> > individual units.
> 
> You're right.  So what then could be the problem?

Oops, I am not right.  Before I looked at the savegame I thought the fog 
is not lifted.  But it is, it's just the units that are invisible.  And 
you are right, the culprit is the call to map_get_known2 or, rather 
map_get_known2 itself, which for some reason was checking "own_seen" 
status!

Attached is the patch.  It works.

The downside of it is that it has nothing to do with the elusive 
pending_seen.

G.

Index: server/maphand.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/server/maphand.c,v
retrieving revision 1.126
diff -u -r1.126 maphand.c
--- server/maphand.c    2003/08/01 15:58:08     1.126
+++ server/maphand.c    2003/08/29 13:02:32
@@ -1198,7 +1198,7 @@
 enum known_type map_get_known2(int x, int y, struct player *pplayer)
 {
   if (map_is_known(x, y, pplayer)) {
-    if (map_get_own_seen(x, y, pplayer) > 0) {
+    if (map_get_seen(x, y, pplayer) > 0) {
       return TILE_KNOWN;
     } else {
       return TILE_KNOWN_FOGGED;

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