Author: sveinung Date: Thu Sep 22 23:18:10 2016 New Revision: 33854 URL: http://svn.gna.org/viewcvs/freeciv?rev=33854&view=rev Log: Remove redundant can move to tile call.
See patch #7709 Modified: trunk/server/unithand.c Modified: trunk/server/unithand.c URL: http://svn.gna.org/viewcvs/freeciv/trunk/server/unithand.c?rev=33854&r1=33853&r2=33854&view=diff ============================================================================== --- trunk/server/unithand.c (original) +++ trunk/server/unithand.c Thu Sep 22 23:18:10 2016 @@ -3446,7 +3446,7 @@ * is not the final destination. */ if (!move_do_not_act && utype_may_act_at_all(unit_type_get(punit))) { - bool can_not_move = !unit_can_move_to_tile(punit, pdesttile, igzoc); + const bool can_not_move = !unit_can_move_to_tile(punit, pdesttile, igzoc); struct tile *ttile = action_tgt_tile(punit, pdesttile, can_not_move); /* Consider to pop up the action selection dialog if a potential city, @@ -3480,7 +3480,7 @@ /* The move wasn't done because the unit wanted the player to * decide what to do. */ return FALSE; - } else if (!unit_can_move_to_tile(punit, pdesttile, igzoc)) { + } else if (can_not_move) { /* No action can be done. No regular move can be done. Attack isn't * possible. Try to explain it to the player. */ explain_why_no_action_enabled(punit, pdesttile, pcity, _______________________________________________ Freeciv-commits mailing list Freeciv-commits@gna.org https://mail.gna.org/listinfo/freeciv-commits