Author: cazfi
Date: Tue Nov 3 06:35:44 2015
New Revision: 30384
URL: http://svn.gna.org/viewcvs/freeciv?rev=30384&view=rev
Log:
Cleaned up begin_turn() is_new_turn checks.
See patch #6502
Modified:
branches/S2_6/server/srv_main.c
Modified: branches/S2_6/server/srv_main.c
URL:
http://svn.gna.org/viewcvs/freeciv/branches/S2_6/server/srv_main.c?rev=30384&r1=30383&r2=30384&view=diff
==============================================================================
--- branches/S2_6/server/srv_main.c (original)
+++ branches/S2_6/server/srv_main.c Tue Nov 3 06:35:44 2015
@@ -909,9 +909,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. */
@@ -948,23 +946,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
[email protected]
https://mail.gna.org/listinfo/freeciv-commits