Author: cazfi
Date: Tue Nov  3 06:35:37 2015
New Revision: 30383

URL: http://svn.gna.org/viewcvs/freeciv?rev=30383&view=rev
Log:
Cleaned up begin_turn() is_new_turn checks.

See patch #6502

Modified:
    trunk/server/srv_main.c

Modified: trunk/server/srv_main.c
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/server/srv_main.c?rev=30383&r1=30382&r2=30383&view=diff
==============================================================================
--- trunk/server/srv_main.c     (original)
+++ trunk/server/srv_main.c     Tue Nov  3 06:35:37 2015
@@ -940,9 +940,7 @@
     script_server_signal_emit("turn_started", 2,
                               API_TYPE_INT, game.info.turn,
                               API_TYPE_INT, game.info.year);
-  }
-
-  if (is_new_turn) {
+
     /* We build scores at the beginning of every turn.  We have to
      * build them at the beginning so that the AI can use the data,
      * and we are sure to have it when we need it. */
@@ -979,23 +977,23 @@
     }
   } players_iterate_end;
 
-  /* See if the value of fog of war has changed */
-  if (is_new_turn && game.info.fogofwar != game.server.fogofwar_old) {
-    if (game.info.fogofwar) {
-      enable_fog_of_war();
-      game.server.fogofwar_old = TRUE;
-    } else {
-      disable_fog_of_war();
-      game.server.fogofwar_old = FALSE;
-    }
-  }
-
-  if (is_new_turn && game.info.phase_mode == PMT_CONCURRENT) {
-    log_debug("Shuffleplayers");
-    shuffle_players();
-  }
-
   if (is_new_turn) {
+    /* See if the value of fog of war has changed */
+    if (game.info.fogofwar != game.server.fogofwar_old) {
+      if (game.info.fogofwar) {
+        enable_fog_of_war();
+        game.server.fogofwar_old = TRUE;
+      } else {
+        disable_fog_of_war();
+        game.server.fogofwar_old = FALSE;
+      }
+    }
+
+    if (game.info.phase_mode == PMT_CONCURRENT) {
+      log_debug("Shuffleplayers");
+      shuffle_players();
+    }
+
     game.info.phase = 0;
   }
 


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

Reply via email to