Opened 10 years ago
Last modified 5 years ago
#2563 new defect
Infinite attempts to return resources in UnitAI
Reported by: | mimo | Owned by: | |
---|---|---|---|
Priority: | Should Have | Milestone: | Backlog |
Component: | Simulation | Keywords: | pathfinding |
Cc: | Itms | Patch: |
Description
When returning resources, the nearest dropsite is chosen in UnitAI without testing if it is accessible. If it is not, once the unit is blocked (for exemple by water), a new dropsite is chosen. But this will usually give the same one as only the distance is used and this will result in an infinite set of trials. This happens quite often on naval maps with islands and the nearest dropsite on another island. A minimal solution would be to exclude the current dropsite from the search of FindNearestDropsite. But a better solution would be that FindNearestDropsite also check the accessibility of the dropsite. A simple map of connected tiles would allow such easy checks.
Change History (9)
comment:1 by , 10 years ago
comment:2 by , 9 years ago
Owner: | set to |
---|---|
Status: | new → assigned |
comment:3 by , 9 years ago
Cc: | added |
---|
Hi maveric, what kind of fix do you have in mind ? because in the new pathFinder being worked on, Itms added an accessibility grid which should be usable by the simulation. This would allow a clean fix of this ticket, as well as some others (like when spawning entities in inaccessible areas). But for that, you need to wait for the new pathFinder to be in svn (not sure if this will happen before A19) or work on the git branch of this new pathFinder.
comment:5 by , 9 years ago
Yes, but as it will be changed in the near future, do not invest time on the current pathFinder (except if your solution will work for both).
comment:6 by , 9 years ago
Keywords: | pathfinding added |
---|
comment:7 by , 9 years ago
Owner: | removed |
---|---|
Status: | assigned → new |
comment:9 by , 5 years ago
Component: | UI & Simulation → Simulation |
---|
Move tickets to Simulation
as UI & Simulation
got some sub components.
In 15325: