206SVN6458-bugs

This place is for Closed bug reports only. NOT for asking help!

Moderators: Moderators, Developers

Message
Author
Rumata
Noob
Noob
Posts: 9
Joined: 09 Apr 2008, 17:22
Noob?: No
Location: Russia
Contact:

206SVN6458-bugs

#1 Post by Rumata »

1. Attack.pm:

Code: Select all

if ($config{attackChangeTarget} == 2)
why?!!! it should be 1.

2. Archer's bug:

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)

from (283, 84) to (283, 84) - why equal?

need change this:

Code: Select all

      # 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; 
            } 
         } 
      }
to this:

Code: Select all

      # 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; 
            } 
         } 
      }
tested by me, all o'key.
if ($MANYquestions) {
brain enable 1;
} else {DIE!!!}

sli
Perl Monk
Perl Monk
Posts: 810
Joined: 04 Apr 2008, 17:26
Noob?: No

Re: 206SVN6458-bugs

#2 Post by sli »

Thanks for the patch file.

Wait...
cs : ee : realist

Click
Human
Human
Posts: 39
Joined: 15 Apr 2008, 06:08
Noob?: Yes
Location: Russia, Velikiy Novgorod
Contact:

Re: 206SVN6458-bugs

#3 Post by Click »

svn 6576. test it.

littlewens
Perl Monk
Perl Monk
Posts: 11
Joined: 22 Apr 2008, 03:46
Noob?: No

Re: 206SVN6458-bugs

#4 Post by littlewens »

about the first point of this topic,

http://forums.openkore.com/viewtopic.php?f=4&t=2467 wrote:
- New flag for attackChangeTarget: 2 - find better attack target while gaining LOS to current target.
if you use "if ($config{attackChangeTarget} == 1)", I can't find any code about using "attackChangeTarget 2" in the source code. So, is it right? ^^"

And according to my test, using "if ($config{attackChangeTarget} == 2)" works fine, even better. Because bot will choose new target when it trying to move to the position of the current target.

Here are my settings:

Code: Select all

attackDistance 10
attackDistanceAuto 0
attackMaxDistance 15
attackMaxRouteDistance 100
attackMaxRouteTime 4
attackNoGiveup 0
attackCanSnipe 1
attackCheckLOS 1
attackChangeTarget 2

Rumata
Noob
Noob
Posts: 9
Joined: 09 Apr 2008, 17:22
Noob?: No
Location: Russia
Contact:

Re: 206SVN6458-bugs

#5 Post by Rumata »

2littlewens - you are right, but i have a question - why do complicate config? this block "if ($config{attackChangeTarget} == 2)" is just the improved version of 'attackChangeTarget'. with my changes i made that works always by default (with attackChangeTarget 1).
if ($MANYquestions) {
brain enable 1;
} else {DIE!!!}

sli
Perl Monk
Perl Monk
Posts: 810
Joined: 04 Apr 2008, 17:26
Noob?: No

Re: 206SVN6458-bugs

#6 Post by sli »

Yeah, honestly I don't understand the point of this change at all.
cs : ee : realist

littlewens
Perl Monk
Perl Monk
Posts: 11
Joined: 22 Apr 2008, 03:46
Noob?: No

Re: 206SVN6458-bugs

#7 Post by littlewens »

Rumata, now I understand your meaning. Your way is better. So, what we need to do is simply modify the Readme.txt at the next update.^^

Click
Human
Human
Posts: 39
Joined: 15 Apr 2008, 06:08
Noob?: Yes
Location: Russia, Velikiy Novgorod
Contact:

Re: 206SVN6458-bugs

#8 Post by Click »

and remove "attackChangeTarget 2" from course code.

User avatar
kLabMouse
Administrator
Administrator
Posts: 1301
Joined: 24 Apr 2008, 12:02

Re: 206SVN6458-bugs

#9 Post by kLabMouse »

Hmm. I think, author forgot to left old code there.
So, yes. "1" is good, because old code changed.

User avatar
kLabMouse
Administrator
Administrator
Posts: 1301
Joined: 24 Apr 2008, 12:02

Re: 206SVN6458-bugs

#10 Post by kLabMouse »

Very old Bug. Fixed ages ago.

Locked