#3577 closed defect (fixed)
Fishing ships stuck at dock
Reported by: | elexis | Owned by: | wraitii |
---|---|---|---|
Priority: | Should Have | Milestone: | Alpha 19 |
Component: | Core engine | Keywords: | pathfinding |
Cc: | Patch: |
Attachments (3)
Change History (8)
by , 8 years ago
Attachment: | commands_maxticatrix.txt added |
---|
comment:2 by , 8 years ago
Keywords: | review added |
---|---|
Resolution: | fixed |
Status: | closed → reopened |
I had a look at it, and the original source of the problem is the way diagonals are treated. From what I have understood, if we want to be at a distance d from a square of halfSize r, the pathfinder tries to go in a square of (d+r), but when we check if we are in range in unitMotion, we use the function distanceToSquare which uses rounded corners.
This is fixed in the patch attached here, isInRange.patch, which fixes the commands_maxticatrix.txt without the changes in the template from r17178 (btw 10 was certainly too big, and i would propose to decrease it after this patch is commited).
Debugging that, I realized that my changes from r17145 were wrong (I misunderstood the meaning of some variables) and are reverted in the second patch reverting.patch with an additionnal fix in the case of inverted circle.
by , 8 years ago
Attachment: | isInRange.patch added |
---|
by , 8 years ago
Attachment: | reverting.patch added |
---|
comment:5 by , 8 years ago
Keywords: | review removed |
---|
The bug appears minute 8 with the only two fishing ships on the map. r17175