исправляю баг с этим
No LOS from (283, 84) to target (275, 75); moving to (283, 84)
No LOS from (283, 84) to target (275, 75); moving to (283, 84)
No LOS from (283, 84) to target (275, 75); moving to (283, 84)
меняем атак.рм, это:
Код: Выделить всё
# Determine which of these spots are snipable
my $best_spot;
my $best_dist;
for my $spot (@stand) {
# Is this spot acceptable?
# 1. It must have LOS to the target ($realMonsterPos).
# 2. It must be within $config{followDistanceMax} of
# $masterPos, if we have a master.
if (
(($config{attackCanSnipe} && checkLineSnipable($spot, $realMonsterPos))
|| checkLineWalkable($spot, $realMonsterPos))
&& $field->isWalkable($spot->{x}, $spot->{y})
&& (!$master || round(distance($spot, $masterPos)) <= $config{followDistanceMax})
) {
my $dist = distance($realMyPos, $spot);
if (!defined($best_dist) || $dist < $best_dist) {
$best_dist = $dist;
$best_spot = $spot;
}
}
}
на это
Код: Выделить всё
# Determine which of these spots are snipable
my $best_spot;
my $best_dist;
for my $spot (@stand) {
# Is this spot acceptable?
# 1. It must have LOS to the target ($realMonsterPos).
# 2. It must be within $config{followDistanceMax} of
# $masterPos, if we have a master.
if (
(($config{attackCanSnipe} && checkLineSnipable($spot, $realMonsterPos))
|| checkLineWalkable($spot, $realMonsterPos))
&& $field->isWalkable($spot->{x}, $spot->{y}) && ($realMyPos->{x} != $spot->{x} && $realMyPos->{y} != $spot->{y})
&& (!$master || round(distance($spot, $masterPos)) <= $config{followDistanceMax})
) {
my $dist = distance($realMyPos, $spot);
if (!defined($best_dist) || $dist < $best_dist) {
$best_dist = $dist;
$best_spot = $spot;
}
}
}