Merge pull request #113988 from kleonc/astar_path_from_disabled_point_is_empty
Fix `AStar`s to return empty path for disabled from point
This commit is contained in:
@@ -152,7 +152,8 @@
|
||||
<param index="2" name="allow_partial_path" type="bool" default="false" />
|
||||
<description>
|
||||
Returns an array with the IDs of the points that form the path found by AStar2D between the given points. The array is ordered from the starting point to the ending point of the path.
|
||||
If there is no valid path to the target, and [param allow_partial_path] is [code]true[/code], returns a path to the point closest to the target that can be reached.
|
||||
If [param from_id] point is disabled, returns an empty array (even if [code]from_id == to_id[/code]).
|
||||
If [param from_id] point is not disabled, there is no valid path to the target, and [param allow_partial_path] is [code]true[/code], returns a path to the point closest to the target that can be reached.
|
||||
[b]Note:[/b] When [param allow_partial_path] is [code]true[/code] and [param to_id] is disabled the search may take an unusually long time to finish.
|
||||
[codeblocks]
|
||||
[gdscript]
|
||||
@@ -244,7 +245,8 @@
|
||||
<param index="2" name="allow_partial_path" type="bool" default="false" />
|
||||
<description>
|
||||
Returns an array with the points that are in the path found by AStar2D between the given points. The array is ordered from the starting point to the ending point of the path.
|
||||
If there is no valid path to the target, and [param allow_partial_path] is [code]true[/code], returns a path to the point closest to the target that can be reached.
|
||||
If [param from_id] point is disabled, returns an empty array (even if [code]from_id == to_id[/code]).
|
||||
If [param from_id] point is not disabled, there is no valid path to the target, and [param allow_partial_path] is [code]true[/code], returns a path to the point closest to the target that can be reached.
|
||||
[b]Note:[/b] This method is not thread-safe; it can only be used from a single [Thread] at a given time. Consider using [Mutex] to ensure exclusive access to one thread to avoid race conditions.
|
||||
Additionally, when [param allow_partial_path] is [code]true[/code] and [param to_id] is disabled the search may take an unusually long time to finish.
|
||||
</description>
|
||||
|
||||
@@ -193,7 +193,8 @@
|
||||
<param index="2" name="allow_partial_path" type="bool" default="false" />
|
||||
<description>
|
||||
Returns an array with the IDs of the points that form the path found by AStar3D between the given points. The array is ordered from the starting point to the ending point of the path.
|
||||
If there is no valid path to the target, and [param allow_partial_path] is [code]true[/code], returns a path to the point closest to the target that can be reached.
|
||||
If [param from_id] point is disabled, returns an empty array (even if [code]from_id == to_id[/code]).
|
||||
If [param from_id] point is not disabled, there is no valid path to the target, and [param allow_partial_path] is [code]true[/code], returns a path to the point closest to the target that can be reached.
|
||||
[b]Note:[/b] When [param allow_partial_path] is [code]true[/code] and [param to_id] is disabled the search may take an unusually long time to finish.
|
||||
[codeblocks]
|
||||
[gdscript]
|
||||
@@ -283,7 +284,8 @@
|
||||
<param index="2" name="allow_partial_path" type="bool" default="false" />
|
||||
<description>
|
||||
Returns an array with the points that are in the path found by AStar3D between the given points. The array is ordered from the starting point to the ending point of the path.
|
||||
If there is no valid path to the target, and [param allow_partial_path] is [code]true[/code], returns a path to the point closest to the target that can be reached.
|
||||
If [param from_id] point is disabled, returns an empty array (even if [code]from_id == to_id[/code]).
|
||||
If [param from_id] point is not disabled, there is no valid path to the target, and [param allow_partial_path] is [code]true[/code], returns a path to the point closest to the target that can be reached.
|
||||
[b]Note:[/b] This method is not thread-safe; it can only be used from a single [Thread] at a given time. Consider using [Mutex] to ensure exclusive access to one thread to avoid race conditions.
|
||||
Additionally, when [param allow_partial_path] is [code]true[/code] and [param to_id] is disabled the search may take an unusually long time to finish.
|
||||
</description>
|
||||
|
||||
@@ -79,7 +79,8 @@
|
||||
<param index="2" name="allow_partial_path" type="bool" default="false" />
|
||||
<description>
|
||||
Returns an array with the IDs of the points that form the path found by AStar2D between the given points. The array is ordered from the starting point to the ending point of the path.
|
||||
If there is no valid path to the target, and [param allow_partial_path] is [code]true[/code], returns a path to the point closest to the target that can be reached.
|
||||
If [param from_id] point is disabled, returns an empty array (even if [code]from_id == to_id[/code]).
|
||||
If [param from_id] point is not disabled, there is no valid path to the target, and [param allow_partial_path] is [code]true[/code], returns a path to the point closest to the target that can be reached.
|
||||
[b]Note:[/b] When [param allow_partial_path] is [code]true[/code] and [param to_id] is solid the search may take an unusually long time to finish.
|
||||
</description>
|
||||
</method>
|
||||
@@ -97,7 +98,8 @@
|
||||
<param index="2" name="allow_partial_path" type="bool" default="false" />
|
||||
<description>
|
||||
Returns an array with the points that are in the path found by [AStarGrid2D] between the given points. The array is ordered from the starting point to the ending point of the path.
|
||||
If there is no valid path to the target, and [param allow_partial_path] is [code]true[/code], returns a path to the point closest to the target that can be reached.
|
||||
If [param from_id] point is disabled, returns an empty array (even if [code]from_id == to_id[/code]).
|
||||
If [param from_id] point is not disabled, there is no valid path to the target, and [param allow_partial_path] is [code]true[/code], returns a path to the point closest to the target that can be reached.
|
||||
[b]Note:[/b] This method is not thread-safe; it can only be used from a single [Thread] at a given time. Consider using [Mutex] to ensure exclusive access to one thread to avoid race conditions.
|
||||
Additionally, when [param allow_partial_path] is [code]true[/code] and [param to_id] is solid the search may take an unusually long time to finish.
|
||||
</description>
|
||||
|
||||
Reference in New Issue
Block a user