Make get_id_path return empty when first point is disabled

This commit is contained in:
jsjtxietian
2024-01-09 11:37:49 +08:00
committed by Rémi Verschelde
parent 019ab8745f
commit 6f094856e7

View File

@@ -481,6 +481,10 @@ Vector<int64_t> AStar3D::get_id_path(int64_t p_from_id, int64_t p_to_id, bool p_
return ret;
}
if (!a->enabled) {
return Vector<int64_t>();
}
Point *begin_point = a;
Point *end_point = b;
@@ -764,6 +768,10 @@ Vector<int64_t> AStar2D::get_id_path(int64_t p_from_id, int64_t p_to_id, bool p_
return ret;
}
if (!a->enabled) {
return Vector<int64_t>();
}
AStar3D::Point *begin_point = a;
AStar3D::Point *end_point = b;