Добавлено: Чт июн 19, 2008 11:50 pm
В модуле AI
sub ai_route {
раньше было:
а сейчас стало:
Кучу параметров поубирали.
Может быть,
Все равно не работает.
sub ai_route {
раньше было:
Код: Выделить всё
my %args;
$x = int($x) if ($x ne "");
$y = int($y) if ($y ne "");
$args{'dest'}{'map'} = $map;
$args{'dest'}{'pos'}{'x'} = $x;
$args{'dest'}{'pos'}{'y'} = $y;
$args{'maxRouteDistance'} = $param{maxRouteDistance} if exists $param{maxRouteDistance};
$args{'maxRouteTime'} = $param{maxRouteTime} if exists $param{maxRouteTime};
$args{'attackOnRoute'} = $param{attackOnRoute} if exists $param{attackOnRoute};
$args{'distFromGoal'} = $param{distFromGoal} if exists $param{distFromGoal};
$args{'pyDistFromGoal'} = $param{pyDistFromGoal} if exists $param{pyDistFromGoal};
$args{'attackID'} = $param{attackID} if exists $param{attackID};
$args{'noSitAuto'} = $param{noSitAuto} if exists $param{noSitAuto};
$args{'noAvoidWalls'} = $param{noAvoidWalls} if exists $param{noAvoidWalls};
$args{notifyUponArrival} = $param{notifyUponArrival} if exists $param{notifyUponArrival};
$args{'tags'} = $param{tags} if exists $param{tags};
$args{'time_start'} = time;
if (!$param{'_internal'}) {
$args{'solution'} = [];
$args{'mapSolution'} = [];
} elsif (exists $param{'_solution'}) {
$args{'solution'} = $param{'_solution'};
}
....
AI::queue("route", \%args);
Код: Выделить всё
my @params = (
x => $x,
y => $y,
maxDistance => $args{maxRouteDistance},
maxTime => $args{maxRouteTime},
distFromGoal => $args{distFromGoal},
pyDistFromGoal => $args{pyDistFromGoal},
avoidWalls => !$args{noAvoidWalls},
notifyUponArrival => $args{notifyUponArrival}
);
if ($args{noMapRoute}) {
$task = new Task::Route(@params);
} else {
$task = new Task::MapRoute(map => $map, @params);
}
$task->{attackOnRoute} = $args{attackOnRoute};
$task->{noSitAuto} = $args{noSitAuto};
AI::queue("route", $task);
}
Может быть,
Код: Выделить всё
my @params = (
x => $x,
y => $y,
attackID => $args{attackID},
maxDistance => $args{maxRouteDistance},
maxTime => $args{maxRouteTime},
distFromGoal => $args{distFromGoal},
pyDistFromGoal => $args{pyDistFromGoal},
avoidWalls => !$args{noAvoidWalls},
notifyUponArrival => $args{notifyUponArrival}
);