Complete.Org: Mailing Lists: Archives: freeciv-dev: February 2006:
[Freeciv-Dev] (PR#15093) fog of war option causes segfault in 11426
Home

[Freeciv-Dev] (PR#15093) fog of war option causes segfault in 11426

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: chadaeschliman@xxxxxxxxx
Subject: [Freeciv-Dev] (PR#15093) fog of war option causes segfault in 11426
From: "Jason Short" <jdorje@xxxxxxxxxxxxxxxxxxxxx>
Date: Wed, 8 Feb 2006 19:21:58 -0800
Reply-to: bugs@xxxxxxxxxxx

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

This patch should fix it.

-jason

Index: server/settings.c
===================================================================
--- server/settings.c   (revision 11560)
+++ server/settings.c   (working copy)
@@ -742,7 +742,7 @@
          GAME_DEFAULT_REVOLUTION_LENGTH)
 
   GEN_BOOL("fogofwar", game.info.fogofwar,
-          SSET_RULES_FLEXIBLE, SSET_MILITARY, SSET_RARE, SSET_TO_CLIENT,
+          SSET_RULES, SSET_MILITARY, SSET_RARE, SSET_TO_CLIENT,
           N_("Whether to enable fog of war"),
           N_("If this is set to 1, only those units and cities within "
              "the vision range of your own units and cities will be "
Index: server/maphand.c
===================================================================
--- server/maphand.c    (revision 11560)
+++ server/maphand.c    (working copy)
@@ -878,6 +878,11 @@
 void map_set_known(struct tile *ptile, struct player *pplayer)
 {
   BV_SET(ptile->tile_known, pplayer->player_no);
+  vision_layer_iterate(v) {
+    if (map_get_player_tile(ptile, pplayer)->seen_count[v] > 0) {
+      BV_SET(ptile->tile_seen[v], pplayer->player_no);
+    }
+  } vision_layer_iterate_end;
 }
 
 /***************************************************************

[Prev in Thread] Current Thread [Next in Thread]
  • [Freeciv-Dev] (PR#15093) fog of war option causes segfault in 11426, Jason Short <=