Author: cazfi
Date: Wed Sep 28 06:33:36 2016
New Revision: 33923

URL: http://svn.gna.org/viewcvs/freeciv?rev=33923&view=rev
Log:
Close default ai data phase after calling ai settler reset for a newly created
barbarian player.

Reported by Frank <dunnoob>

See bug #24545

Modified:
    trunk/ai/default/aisettler.c

Modified: trunk/ai/default/aisettler.c
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/ai/default/aisettler.c?rev=33923&r1=33922&r2=33923&view=diff
==============================================================================
--- trunk/ai/default/aisettler.c        (original)
+++ trunk/ai/default/aisettler.c        Wed Sep 28 06:33:36 2016
@@ -1186,7 +1186,8 @@
 **************************************************************************/
 void dai_auto_settler_reset(struct ai_type *ait, struct player *pplayer)
 {
-  struct ai_plr *ai = dai_plr_data_get(ait, pplayer, NULL);
+  bool close;
+  struct ai_plr *ai = dai_plr_data_get(ait, pplayer, &close);
 
   fc_assert_ret(ai != NULL);
   fc_assert_ret(ai->settler != NULL);
@@ -1205,6 +1206,10 @@
 #endif /* FREECIV_DEBUG */
 
   tile_data_cache_hash_clear(ai->settler->tdc_hash);
+
+  if (close) {
+    dai_data_phase_finished(ait, pplayer);
+  }
 }
 
 /**************************************************************************


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

Reply via email to