Comment 8 for bug 1511828

Revision history for this message
Bill Erickson (berick) wrote : Re: [Bug 1511828] Re: hold targeter sorts proximities alphabetically, not numerically

On Mon, Nov 2, 2015 at 8:39 AM, Josh Stompro <email address hidden> wrote:

> Thanks Bill, I'll add that change also.
>
> I would like to track down some of the other warnings that pop up when
> targeting also, I'm not sure I'll have a chance here though.
>
> There are a few that come up when there are no holdable copies.
>
> I don' t understand why this code even needs to be called at all if
> there are no holdable copies to get the minimum proximity of.
>

Indeed, and choose_nearest_copy() does nothing if no copies are passed.

Maybe just:

- } else {
+ } elsif (defined $min_prox) {
                 $best = choose_nearest_copy($hold, { $min_prox =>
delete($$prox_list{$min_prox}) });
             }