Complete.Org: Mailing Lists: Archives: freeciv-dev: January 2005:
[Freeciv-Dev] (PR#12054) tile_get_known() fix
Home

[Freeciv-Dev] (PR#12054) tile_get_known() fix

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
Subject: [Freeciv-Dev] (PR#12054) tile_get_known() fix
From: "Mike Kaufman" <kaufman@xxxxxxxxxxxxxxxxxxxxxx>
Date: Sun, 30 Jan 2005 19:44:09 -0800
Reply-to: bugs@xxxxxxxxxxx

<URL: http://bugs.freeciv.org/Ticket/Display.html?id=12054 >

ptile->known is used in mapview_common.c. This is a no-no.

patches for S2_0 and HEAD attached.

-mike

Index: client/mapview_common.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/client/mapview_common.c,v
retrieving revision 1.151.2.14
diff -u -r1.151.2.14 mapview_common.c
--- client/mapview_common.c     5 Jan 2005 23:24:26 -0000       1.151.2.14
+++ client/mapview_common.c     31 Jan 2005 03:40:38 -0000
@@ -1460,7 +1460,7 @@
   int count = fill_sprite_array(tile_sprs, ptile,
                                get_drawable_unit(ptile, citymode),
                                ptile->city, citymode);
-  bool fog = (ptile->known == TILE_KNOWN_FOGGED && draw_fog_of_war
+  bool fog = (tile_get_known(ptile) == TILE_KNOWN_FOGGED && draw_fog_of_war
              && fogstyle == 0);
 
   /*** Draw terrain and specials ***/
? 0
? gamelog
Index: client/mapview_common.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/client/mapview_common.c,v
retrieving revision 1.171
diff -u -r1.171 mapview_common.c
--- client/mapview_common.c     5 Jan 2005 23:24:24 -0000       1.171
+++ client/mapview_common.c     31 Jan 2005 03:43:53 -0000
@@ -1443,7 +1443,7 @@
   int count = fill_sprite_array(tile_sprs, layer, ptile,
                                get_drawable_unit(ptile, citymode),
                                ptile->city, citymode);
-  bool fog = (ptile->known == TILE_KNOWN_FOGGED && draw_fog_of_war
+  bool fog = (tile_get_known(ptile) == TILE_KNOWN_FOGGED && draw_fog_of_war
              && fogstyle == 0);
 
   /*** Draw terrain and specials ***/

[Prev in Thread] Current Thread [Next in Thread]
  • [Freeciv-Dev] (PR#12054) tile_get_known() fix, Mike Kaufman <=