Author: cazfi
Date: Tue Apr 12 22:37:39 2016
New Revision: 32368

URL: http://svn.gna.org/viewcvs/freeciv?rev=32368&view=rev
Log:
Stop loading saved game from revealing entire map to such dead players for whom
it should not be shown according to 'revealmap' setting.

Reported by Jacob Nevins <jtn>

See bug #21296

Modified:
    trunk/server/savegame2.c
    trunk/server/savegame3.c

Modified: trunk/server/savegame2.c
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/server/savegame2.c?rev=32368&r1=32367&r2=32368&view=diff
==============================================================================
--- trunk/server/savegame2.c    (original)
+++ trunk/server/savegame2.c    Tue Apr 12 22:37:39 2016
@@ -4406,8 +4406,11 @@
   sg_check_ret();
 
   if (!plr->is_alive) {
-    /* Reveal all for dead players. */
-    map_know_and_see_all(plr);
+    if (game.server.revealmap & REVEAL_MAP_DEAD
+        && player_list_size(team_members(plr->team)) == 1) {
+      /* Reveal all for dead players. */
+      map_know_and_see_all(plr);
+    }
   }
 
   if (!plr->is_alive

Modified: trunk/server/savegame3.c
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/server/savegame3.c?rev=32368&r1=32367&r2=32368&view=diff
==============================================================================
--- trunk/server/savegame3.c    (original)
+++ trunk/server/savegame3.c    Tue Apr 12 22:37:39 2016
@@ -5985,8 +5985,11 @@
   sg_check_ret();
 
   if (!plr->is_alive) {
-    /* Reveal all for dead players. */
-    map_know_and_see_all(plr);
+    if (game.server.revealmap & REVEAL_MAP_DEAD
+        && player_list_size(team_members(plr->team)) == 1) {
+      /* Reveal all for dead players. */
+      map_know_and_see_all(plr);
+    }
   }
 
   if (!plr->is_alive


_______________________________________________
Freeciv-commits mailing list
Freeciv-commits@gna.org
https://mail.gna.org/listinfo/freeciv-commits

Reply via email to