Author: sveinung Date: Tue Feb 24 10:16:49 2015 New Revision: 28306 URL: http://svn.gna.org/viewcvs/freeciv?rev=28306&view=rev Log: 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 consistent. 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 Modified: branches/S2_6/server/unithand.c URL: http://svn.gna.org/viewcvs/freeciv/branches/S2_6/server/unithand.c?rev=28306&r1=28305&r2=28306&view=diff ============================================================================== --- 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) { fc_assert(!unit_has_orders(punit)); send_unit_info(NULL, punit); _______________________________________________ Freeciv-commits mailing list Freeciv-commits@gna.org https://mail.gna.org/listinfo/freeciv-commits