summaryrefslogtreecommitdiff
path: root/core/math
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <remi@verschelde.fr>2022-06-16 12:46:51 +0200
committerGitHub <noreply@github.com>2022-06-16 12:46:51 +0200
commit1ad6fade00ab3f43efc87038abeab922eb8bdd4c (patch)
tree5af34f35e9176cd5a57e24bf9f9d32d6b2112004 /core/math
parent7cc99d213f4eb3b73f9169140dff2f7a6f02065f (diff)
parentb18a018ad23f95b1f3cdedc74c14e09d666dc346 (diff)
Merge pull request #58669 from theraot/ASar2Dbidirectional
AStar2D bidirectional
Diffstat (limited to 'core/math')
-rw-r--r--core/math/a_star.cpp12
-rw-r--r--core/math/a_star.h4
2 files changed, 8 insertions, 8 deletions
diff --git a/core/math/a_star.cpp b/core/math/a_star.cpp
index efa970c681..c43fcf279e 100644
--- a/core/math/a_star.cpp
+++ b/core/math/a_star.cpp
@@ -621,12 +621,12 @@ void AStar2D::connect_points(int p_id, int p_with_id, bool p_bidirectional) {
astar.connect_points(p_id, p_with_id, p_bidirectional);
}
-void AStar2D::disconnect_points(int p_id, int p_with_id) {
- astar.disconnect_points(p_id, p_with_id);
+void AStar2D::disconnect_points(int p_id, int p_with_id, bool p_bidirectional) {
+ astar.disconnect_points(p_id, p_with_id, p_bidirectional);
}
-bool AStar2D::are_points_connected(int p_id, int p_with_id) const {
- return astar.are_points_connected(p_id, p_with_id);
+bool AStar2D::are_points_connected(int p_id, int p_with_id, bool p_bidirectional) const {
+ return astar.are_points_connected(p_id, p_with_id, p_bidirectional);
}
int AStar2D::get_point_count() const {
@@ -863,8 +863,8 @@ void AStar2D::_bind_methods() {
ClassDB::bind_method(D_METHOD("is_point_disabled", "id"), &AStar2D::is_point_disabled);
ClassDB::bind_method(D_METHOD("connect_points", "id", "to_id", "bidirectional"), &AStar2D::connect_points, DEFVAL(true));
- ClassDB::bind_method(D_METHOD("disconnect_points", "id", "to_id"), &AStar2D::disconnect_points);
- ClassDB::bind_method(D_METHOD("are_points_connected", "id", "to_id"), &AStar2D::are_points_connected);
+ ClassDB::bind_method(D_METHOD("disconnect_points", "id", "to_id", "bidirectional"), &AStar2D::disconnect_points, DEFVAL(true));
+ ClassDB::bind_method(D_METHOD("are_points_connected", "id", "to_id", "bidirectional"), &AStar2D::are_points_connected, DEFVAL(true));
ClassDB::bind_method(D_METHOD("get_point_count"), &AStar2D::get_point_count);
ClassDB::bind_method(D_METHOD("get_point_capacity"), &AStar2D::get_point_capacity);
diff --git a/core/math/a_star.h b/core/math/a_star.h
index e2f75ad18c..4d69822254 100644
--- a/core/math/a_star.h
+++ b/core/math/a_star.h
@@ -195,8 +195,8 @@ public:
bool is_point_disabled(int p_id) const;
void connect_points(int p_id, int p_with_id, bool p_bidirectional = true);
- void disconnect_points(int p_id, int p_with_id);
- bool are_points_connected(int p_id, int p_with_id) const;
+ void disconnect_points(int p_id, int p_with_id, bool p_bidirectional = true);
+ bool are_points_connected(int p_id, int p_with_id, bool p_bidirectional = true) const;
int get_point_count() const;
int get_point_capacity() const;