Author: sveinung
Date: Tue Feb 24 10:16:49 2015
New Revision: 28306

Always clear a unit's ai_controlled state when receiving new orders for it.

Before this patch a unit would lose its auto settler state when asked to
build a single road (via unit_change_activity) but keep it when asked to
build many roads (via unit_orders). This patch makes the behavior

A player that wish a unit to be auto settler controlled after its orders are
executed can still set the unit's auto setter state immediately after giving
it the new orders.

See bug #23307


Modified: branches/S2_6/server/unithand.c
--- branches/S2_6/server/unithand.c     (original)
+++ branches/S2_6/server/unithand.c     Tue Feb 24 10:16:49 2015
@@ -2935,6 +2935,10 @@
   /* If we waited on a tile, reset punit->done_moving */
   punit->done_moving = (punit->moves_left <= 0);
+  /* Make sure that the unit won't keep its old ai_controlled state after
+   * it has recieved new orders from the client. */
+  punit->ai_controlled = FALSE;
   if (length == 0) {
     send_unit_info(NULL, punit);

Freeciv-commits mailing list

Reply via email to