Author: sveinung Date: Fri Sep 4 14:16:15 2015 New Revision: 29771 URL: http://svn.gna.org/viewcvs/freeciv?rev=29771&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: 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=29771&r1=29770&r2=29771&view=diff ============================================================================== --- branches/S2_6/server/unithand.c (original) +++ branches/S2_6/server/unithand.c Fri Sep 4 14:16:15 2015 @@ -1699,9 +1699,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 - @@ -1709,8 +1710,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