Complete.Org: Mailing Lists: Archives: freeciv-dev: December 2003:
[Freeciv-Dev] Re: (PR#7001) Ghost unit (delta bug most probably)
Home

[Freeciv-Dev] Re: (PR#7001) Ghost unit (delta bug most probably)

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: imbaczek@xxxxxxxxxxxxxx
Subject: [Freeciv-Dev] Re: (PR#7001) Ghost unit (delta bug most probably)
From: "Raimar Falke" <i-freeciv-lists@xxxxxxxxxxxxx>
Date: Mon, 1 Dec 2003 00:24:48 -0800
Reply-to: rt@xxxxxxxxxxx

<URL: http://rt.freeciv.org/Ticket/Display.html?id=7001 >

On Sun, Nov 30, 2003 at 02:26:59PM -0800, Guest wrote:
> 
> <URL: http://rt.freeciv.org/Ticket/Display.html?id=7001 >
> 
> > [i-freeciv-lists@xxxxxxxxxxxxx - Sun Nov 30 21:42:39 2003]:
> > 
> > On Sun, Nov 30, 2003 at 12:59:16PM -0800, Guest wrote:
> > > 
> > > <URL: http://rt.freeciv.org/Ticket/Display.html?id=7001 >
> > > 
> > > > [guest - Sun Nov 30 20:29:15 2003]:
> > > > 
> > > > See image - my trireme is stacked with the Zulu one, or at least the
> > > > client thinks so.
> > > > 
> > > > Save attached.
> > > 
> > > Corrupted :/
> > 
> > Looks like I have to do another round of RT debugging.
> > 
> > > http://users.vlo.ids.gda.pl/imbaczek/freeciv/
> > 
> > The problem isn't reproducible from the savegame. This was to be
> > expected. Can you remember when happend before? Can you reproduce the
> > problem from an earlier savegame?
> 
> I *think* this should suffice.
> 
> http://users.vlo.ids.gda.pl/imbaczek/freeciv/civgame-0700.sav.gz
> 
> Connect as imbaczek, turn done, get yourself a boat and see if Mary
> Celeste is there.

I can reproduce this. The attached patch fixes this.

        Raimar


-- 
 email: rf13@xxxxxxxxxxxxxxxxx
 "Despite all the medical advances of the 20th century, the mortality 
  rate remains unchanged at 1 death per person."

Index: server/unittools.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/server/unittools.c,v
retrieving revision 1.265
diff -u -u -r1.265 unittools.c
--- server/unittools.c  2003/11/28 17:37:22     1.265
+++ server/unittools.c  2003/12/01 08:22:35
@@ -3060,6 +3063,17 @@
     fog_area(pplayer, src_x, src_y,
             unit_type(punit)->vision_range);
   }
+
+  /*
+   * Let the unit goes out of sight for the players which doesn't see
+   * the unit anymore.
+   */
+  players_iterate(pplayer) {
+    if (can_player_see_unit_at2(pplayer, punit, src_x, src_y)
+       && !can_player_see_unit_at2(pplayer, punit, dest_x, dest_y)) {
+      unit_goes_out_of_sight(pplayer, punit);
+    }
+  } players_iterate_end;
 
   handle_unit_move_consequences(punit, src_x, src_y, dest_x, dest_y);
   wakeup_neighbor_sentries(punit);

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