Complete.Org: Mailing Lists: Archives: freeciv-dev: August 2004:
[Freeciv-Dev] (PR#9658) unit not centered (single player)
Home

[Freeciv-Dev] (PR#9658) unit not centered (single player)

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: chrisk@xxxxxxxxx
Subject: [Freeciv-Dev] (PR#9658) unit not centered (single player)
From: "Jason Short" <jdorje@xxxxxxxxxxxxxxxxxxxxx>
Date: Tue, 17 Aug 2004 21:47:08 -0700
Reply-to: rt@xxxxxxxxxxx

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

> [chrisk - Tue Aug 10 08:27:51 2004]:
> 
> 
> CVS 10 AUG 2004 GTK2
> 
> In quite a number of occurences, the active unit is not centered in
the map.
> I.e. I move one unit, then the next unit is active but seen in map
display.
> 
> The attached savegame is one example to this.
> 
> Just start the game, click into the map (small bug BTW), then use 'w'
key to
> go through active units.

Great!  A simple bug but I think it was causing many problems.  Now the
trouble is that all the focus bugs we've had reported need to be verified...

jason

Index: client/mapview_common.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/client/mapview_common.c,v
retrieving revision 1.139
diff -u -r1.139 mapview_common.c
--- client/mapview_common.c     2 Aug 2004 16:59:14 -0000       1.139
+++ client/mapview_common.c     18 Aug 2004 04:46:14 -0000
@@ -706,11 +706,11 @@
     return FALSE;
   }
   if (canvas_x + NORMAL_TILE_WIDTH > mapview_canvas.width - border_x
-      && (!same || scroll_x + xsize >= xmax || topo_has_flag(TF_WRAPX))) {
+      && (!same || scroll_x + xsize < xmax || topo_has_flag(TF_WRAPX))) {
     return FALSE;
   }
   if (canvas_y + NORMAL_TILE_HEIGHT > mapview_canvas.height - border_y
-      && (!same || scroll_y + ysize >= ymax || topo_has_flag(TF_WRAPY))) {
+      && (!same || scroll_y + ysize < ymax || topo_has_flag(TF_WRAPY))) {
     return FALSE;
   }
 

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