Fix AStars to return empty path for disabled from point#113988
Merged
akien-mga merged 1 commit intogodotengine:masterfrom Jan 1, 2026
Merged
Fix AStars to return empty path for disabled from point#113988akien-mga merged 1 commit intogodotengine:masterfrom
AStars to return empty path for disabled from point#113988akien-mga merged 1 commit intogodotengine:masterfrom
Conversation
ellie1232
reviewed
Dec 14, 2025
ellie1232
left a comment
There was a problem hiding this comment.
Tested in engine in 2D, Confirmed the issue exists on the current stable branch and that it behaves as expected in the PR.
Read over the commit and didn't see any obvious issues but I'm not overly familiar with the source code so I may have missed something.
smix8
approved these changes
Dec 29, 2025
Member
|
Thanks! |
AStars to return empty path for disabled from pointAStars to return empty path for disabled from point
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #113975.
#86983 changed only
AStar2D::get_id_path/AStar3D::get_id_pathto return an empty path iffrompoint is disabled.This PR makes the same for:
AStar2D::get_point_pathAStar3D::get_point_pathAStarGrid2D::get_id_path(API-wise forAStarGrid2Dpoints can be "solid" instead of "disabled")AStarGrid2D::get_point_pathFor all
AStars, I've moved the condition checking to the internal_solvemethod used by bothget_id_path/get_point_path.Also previously (even after #86983) e.g.
AStar2D::get_id_path(from, from)for a disabledfromwould still return a single-point path instead of an empty path, asfrom == towas being checked before!from.enabled. Fixed/swapped these checks order as well.Added relevant test case for
AStar3D(AStar2D,AStarGrid2Dhave no tests at all).