Author: cazfi
Date: Fri Aug 21 18:30:49 2015
New Revision: 29630

URL: http://svn.gna.org/viewcvs/freeciv?rev=29630&view=rev
Log:
Do not progress, nor finish, revolution for a dead player.

See bug #23803

Modified:
    branches/S2_6/server/plrhand.h
    branches/S2_6/server/srv_main.c

Modified: branches/S2_6/server/plrhand.h
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_6/server/plrhand.h?rev=29630&r1=29629&r2=29630&view=diff
==============================================================================
--- branches/S2_6/server/plrhand.h      (original)
+++ branches/S2_6/server/plrhand.h      Fri Aug 21 18:30:49 2015
@@ -109,7 +109,17 @@
 #define phase_players_iterate_end\
     }\
   } shuffled_players_iterate_end;\
-} while (0)
+} while (FALSE);
+
+#define alive_phase_players_iterate(pplayer) \
+do { \
+  phase_players_iterate(pplayer) { \
+    if (pplayer->is_alive) {
+
+#define alive_phase_players_iterate_end \
+    } \
+  } phase_players_iterate_end \
+} while (FALSE);
 
 bool civil_war_possible(struct player *pplayer, bool conquering_city,
                         bool honour_server_option);

Modified: branches/S2_6/server/srv_main.c
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_6/server/srv_main.c?rev=29630&r1=29629&r2=29630&view=diff
==============================================================================
--- branches/S2_6/server/srv_main.c     (original)
+++ branches/S2_6/server/srv_main.c     Fri Aug 21 18:30:49 2015
@@ -1024,9 +1024,9 @@
   flush_packets();  /* to curb major city spam */
   conn_list_do_unbuffer(game.est_connections);
 
-  phase_players_iterate(pplayer) {
+  alive_phase_players_iterate(pplayer) {
     update_revolution(pplayer);
-  } phase_players_iterate_end;
+  } alive_phase_players_iterate_end;
 
   if (is_new_phase) {
     /* Try to avoid hiding events under a diplomacy dialog */


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

Reply via email to