<URL: http://bugs.freeciv.org/Ticket/Display.html?id=39693 >
Currently unit info label lists "Turns to target" with very large value (FC_INFINITY) when goto hover is over impossible destination (such as Sea tile for Land unit). This also causes widget resizes. I first found this bug as 'earthquake' effect when mouse was just between legal and illegal tile. Fix attached. - ML
diff -Nurd -X.diff_ignore freeciv/client/text.c freeciv/client/text.c --- freeciv/client/text.c 2007-08-25 15:28:38.000000000 +0300 +++ freeciv/client/text.c 2007-09-09 04:06:58.000000000 +0300 @@ -699,7 +699,9 @@ if (count > 0 && unit_list_size(hover_units) > 0) { int min, max; - if (!goto_get_turns(&min, &max)) { + if (!is_valid_goto_destination(hover_tile)) { + astr_add_line(&str, _("Unreachable target")); + } else if (!goto_get_turns(&min, &max)) { astr_add_line(&str, _("Turns to target: %d"), min); } else if (min == max) { astr_add_line(&str, _("Turns to target: %d"), max);
_______________________________________________ Freeciv-dev mailing list Freeciv-dev@gna.org https://mail.gna.org/listinfo/freeciv-dev