Author: sveinung Date: Fri Sep 4 13:08:36 2015 New Revision: 29766 URL: http://svn.gna.org/viewcvs/freeciv?rev=29766&view=rev Log: unithand: deduplicate activity setting
The activity is set the same way no matter if it is explore or not. See patch #6317 Modified: trunk/server/unithand.c Modified: trunk/server/unithand.c URL: http://svn.gna.org/viewcvs/freeciv/trunk/server/unithand.c?rev=29766&r1=29765&r2=29766&view=diff ============================================================================== --- trunk/server/unithand.c (original) +++ trunk/server/unithand.c Fri Sep 4 13:08:36 2015 @@ -2282,9 +2282,10 @@ return; } + /* The activity can now be set. */ + unit_activity_handling_targeted(punit, activity, &activity_target); + if (activity == ACTIVITY_EXPLORE) { - unit_activity_handling_targeted(punit, activity, &activity_target); - /* Exploring is handled here explicitly, since the player expects to * see an immediate response from setting a unit to auto-explore. * Handling it deeper in the code leads to some tricky recursive loops - @@ -2292,8 +2293,6 @@ if (punit->moves_left > 0) { do_explore(punit); } - } else { - unit_activity_handling_targeted(punit, activity, &activity_target); } } _______________________________________________ Freeciv-commits mailing list Freeciv-commits@gna.org https://mail.gna.org/listinfo/freeciv-commits