summaryrefslogtreecommitdiff
path: root/servers
diff options
context:
space:
mode:
authorsmix8 <52464204+smix8@users.noreply.github.com>2022-12-06 23:32:11 +0100
committersmix8 <52464204+smix8@users.noreply.github.com>2023-01-26 18:19:03 +0100
commitbf1571979cd3cd90b2b5c4581b2947450aa4cd9d (patch)
treec47b8ff57f6fb444e9f4c57d259f6fdcad7f218e /servers
parenta3a42159e31db27f8ae7c1ecad6a9ed417cb05de (diff)
Rename Navigation uses of 'location' to 'position'
Contrary to the entire rest of the engine NavigationAgent's and NavigationLinks decided to deal with locations instead of positions.
Diffstat (limited to 'servers')
-rw-r--r--servers/navigation_server_2d.cpp16
-rw-r--r--servers/navigation_server_2d.h14
-rw-r--r--servers/navigation_server_3d.cpp8
-rw-r--r--servers/navigation_server_3d.h14
4 files changed, 26 insertions, 26 deletions
diff --git a/servers/navigation_server_2d.cpp b/servers/navigation_server_2d.cpp
index 943b2ae467..88178d5c7d 100644
--- a/servers/navigation_server_2d.cpp
+++ b/servers/navigation_server_2d.cpp
@@ -285,10 +285,10 @@ void NavigationServer2D::_bind_methods() {
ClassDB::bind_method(D_METHOD("link_is_bidirectional", "link"), &NavigationServer2D::link_is_bidirectional);
ClassDB::bind_method(D_METHOD("link_set_navigation_layers", "link", "navigation_layers"), &NavigationServer2D::link_set_navigation_layers);
ClassDB::bind_method(D_METHOD("link_get_navigation_layers", "link"), &NavigationServer2D::link_get_navigation_layers);
- ClassDB::bind_method(D_METHOD("link_set_start_location", "link", "location"), &NavigationServer2D::link_set_start_location);
- ClassDB::bind_method(D_METHOD("link_get_start_location", "link"), &NavigationServer2D::link_get_start_location);
- ClassDB::bind_method(D_METHOD("link_set_end_location", "link", "location"), &NavigationServer2D::link_set_end_location);
- ClassDB::bind_method(D_METHOD("link_get_end_location", "link"), &NavigationServer2D::link_get_end_location);
+ ClassDB::bind_method(D_METHOD("link_set_start_position", "link", "position"), &NavigationServer2D::link_set_start_position);
+ ClassDB::bind_method(D_METHOD("link_get_start_position", "link"), &NavigationServer2D::link_get_start_position);
+ ClassDB::bind_method(D_METHOD("link_set_end_position", "link", "position"), &NavigationServer2D::link_set_end_position);
+ ClassDB::bind_method(D_METHOD("link_get_end_position", "link"), &NavigationServer2D::link_get_end_position);
ClassDB::bind_method(D_METHOD("link_set_enter_cost", "link", "enter_cost"), &NavigationServer2D::link_set_enter_cost);
ClassDB::bind_method(D_METHOD("link_get_enter_cost", "link"), &NavigationServer2D::link_get_enter_cost);
ClassDB::bind_method(D_METHOD("link_set_travel_cost", "link", "travel_cost"), &NavigationServer2D::link_set_travel_cost);
@@ -392,10 +392,10 @@ void FORWARD_2(link_set_bidirectional, RID, p_link, bool, p_bidirectional, rid_t
bool FORWARD_1_C(link_is_bidirectional, RID, p_link, rid_to_rid);
void FORWARD_2(link_set_navigation_layers, RID, p_link, uint32_t, p_navigation_layers, rid_to_rid, uint32_to_uint32);
uint32_t FORWARD_1_C(link_get_navigation_layers, RID, p_link, rid_to_rid);
-void FORWARD_2(link_set_start_location, RID, p_link, Vector2, p_location, rid_to_rid, v2_to_v3);
-Vector2 FORWARD_1_R_C(v3_to_v2, link_get_start_location, RID, p_link, rid_to_rid);
-void FORWARD_2(link_set_end_location, RID, p_link, Vector2, p_location, rid_to_rid, v2_to_v3);
-Vector2 FORWARD_1_R_C(v3_to_v2, link_get_end_location, RID, p_link, rid_to_rid);
+void FORWARD_2(link_set_start_position, RID, p_link, Vector2, p_position, rid_to_rid, v2_to_v3);
+Vector2 FORWARD_1_R_C(v3_to_v2, link_get_start_position, RID, p_link, rid_to_rid);
+void FORWARD_2(link_set_end_position, RID, p_link, Vector2, p_position, rid_to_rid, v2_to_v3);
+Vector2 FORWARD_1_R_C(v3_to_v2, link_get_end_position, RID, p_link, rid_to_rid);
void FORWARD_2(link_set_enter_cost, RID, p_link, real_t, p_enter_cost, rid_to_rid, real_to_real);
real_t FORWARD_1_C(link_get_enter_cost, RID, p_link, rid_to_rid);
void FORWARD_2(link_set_travel_cost, RID, p_link, real_t, p_travel_cost, rid_to_rid, real_to_real);
diff --git a/servers/navigation_server_2d.h b/servers/navigation_server_2d.h
index 0adf736b2a..b50808cddf 100644
--- a/servers/navigation_server_2d.h
+++ b/servers/navigation_server_2d.h
@@ -130,7 +130,7 @@ public:
virtual Vector2 region_get_connection_pathway_start(RID p_region, int p_connection_id) const;
virtual Vector2 region_get_connection_pathway_end(RID p_region, int p_connection_id) const;
- /// Creates a new link between locations in the nav map.
+ /// Creates a new link between positions in the nav map.
virtual RID link_create();
/// Set the map of this link.
@@ -145,13 +145,13 @@ public:
virtual void link_set_navigation_layers(RID p_link, uint32_t p_navigation_layers);
virtual uint32_t link_get_navigation_layers(RID p_link) const;
- /// Set the start location of the link.
- virtual void link_set_start_location(RID p_link, Vector2 p_location);
- virtual Vector2 link_get_start_location(RID p_link) const;
+ /// Set the start position of the link.
+ virtual void link_set_start_position(RID p_link, Vector2 p_position);
+ virtual Vector2 link_get_start_position(RID p_link) const;
- /// Set the end location of the link.
- virtual void link_set_end_location(RID p_link, Vector2 p_location);
- virtual Vector2 link_get_end_location(RID p_link) const;
+ /// Set the end position of the link.
+ virtual void link_set_end_position(RID p_link, Vector2 p_position);
+ virtual Vector2 link_get_end_position(RID p_link) const;
/// Set the enter cost of the link.
virtual void link_set_enter_cost(RID p_link, real_t p_enter_cost);
diff --git a/servers/navigation_server_3d.cpp b/servers/navigation_server_3d.cpp
index 253b28a623..07256badef 100644
--- a/servers/navigation_server_3d.cpp
+++ b/servers/navigation_server_3d.cpp
@@ -90,10 +90,10 @@ void NavigationServer3D::_bind_methods() {
ClassDB::bind_method(D_METHOD("link_is_bidirectional", "link"), &NavigationServer3D::link_is_bidirectional);
ClassDB::bind_method(D_METHOD("link_set_navigation_layers", "link", "navigation_layers"), &NavigationServer3D::link_set_navigation_layers);
ClassDB::bind_method(D_METHOD("link_get_navigation_layers", "link"), &NavigationServer3D::link_get_navigation_layers);
- ClassDB::bind_method(D_METHOD("link_set_start_location", "link", "location"), &NavigationServer3D::link_set_start_location);
- ClassDB::bind_method(D_METHOD("link_get_start_location", "link"), &NavigationServer3D::link_get_start_location);
- ClassDB::bind_method(D_METHOD("link_set_end_location", "link", "location"), &NavigationServer3D::link_set_end_location);
- ClassDB::bind_method(D_METHOD("link_get_end_location", "link"), &NavigationServer3D::link_get_end_location);
+ ClassDB::bind_method(D_METHOD("link_set_start_position", "link", "position"), &NavigationServer3D::link_set_start_position);
+ ClassDB::bind_method(D_METHOD("link_get_start_position", "link"), &NavigationServer3D::link_get_start_position);
+ ClassDB::bind_method(D_METHOD("link_set_end_position", "link", "position"), &NavigationServer3D::link_set_end_position);
+ ClassDB::bind_method(D_METHOD("link_get_end_position", "link"), &NavigationServer3D::link_get_end_position);
ClassDB::bind_method(D_METHOD("link_set_enter_cost", "link", "enter_cost"), &NavigationServer3D::link_set_enter_cost);
ClassDB::bind_method(D_METHOD("link_get_enter_cost", "link"), &NavigationServer3D::link_get_enter_cost);
ClassDB::bind_method(D_METHOD("link_set_travel_cost", "link", "travel_cost"), &NavigationServer3D::link_set_travel_cost);
diff --git a/servers/navigation_server_3d.h b/servers/navigation_server_3d.h
index 6c4bd2e151..4d81726fc3 100644
--- a/servers/navigation_server_3d.h
+++ b/servers/navigation_server_3d.h
@@ -145,7 +145,7 @@ public:
virtual Vector3 region_get_connection_pathway_start(RID p_region, int p_connection_id) const = 0;
virtual Vector3 region_get_connection_pathway_end(RID p_region, int p_connection_id) const = 0;
- /// Creates a new link between locations in the nav map.
+ /// Creates a new link between positions in the nav map.
virtual RID link_create() = 0;
/// Set the map of this link.
@@ -160,13 +160,13 @@ public:
virtual void link_set_navigation_layers(RID p_link, uint32_t p_navigation_layers) = 0;
virtual uint32_t link_get_navigation_layers(RID p_link) const = 0;
- /// Set the start location of the link.
- virtual void link_set_start_location(RID p_link, Vector3 p_location) = 0;
- virtual Vector3 link_get_start_location(RID p_link) const = 0;
+ /// Set the start position of the link.
+ virtual void link_set_start_position(RID p_link, Vector3 p_position) = 0;
+ virtual Vector3 link_get_start_position(RID p_link) const = 0;
- /// Set the end location of the link.
- virtual void link_set_end_location(RID p_link, Vector3 p_location) = 0;
- virtual Vector3 link_get_end_location(RID p_link) const = 0;
+ /// Set the end position of the link.
+ virtual void link_set_end_position(RID p_link, Vector3 p_position) = 0;
+ virtual Vector3 link_get_end_position(RID p_link) const = 0;
/// Set the enter cost of the link.
virtual void link_set_enter_cost(RID p_link, real_t p_enter_cost) = 0;