From b62d06fbeddfd7e584587d1a86f69ed09dff65e6 Mon Sep 17 00:00:00 2001 From: Micky Date: Sat, 13 Aug 2022 12:26:13 +0200 Subject: Rename Navigation's `neighbor_dist` to `neightbor_distance` NavigationAgent2D/3D.`neighbor_dist` -> `neighbor_distance` (also affects setters and getters) NavigationServer2D/3D.`agent_set_neighbor_dist()` -> `agent_set_neighbor_distance()` Also changes their parameters' names. Doesn't affect "Agent.neighborDist_" in Agent.h --- servers/navigation_server_2d.cpp | 4 ++-- servers/navigation_server_2d.h | 2 +- servers/navigation_server_3d.cpp | 2 +- servers/navigation_server_3d.h | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) (limited to 'servers') diff --git a/servers/navigation_server_2d.cpp b/servers/navigation_server_2d.cpp index 126bb08c94..692e9314f0 100644 --- a/servers/navigation_server_2d.cpp +++ b/servers/navigation_server_2d.cpp @@ -237,7 +237,7 @@ void NavigationServer2D::_bind_methods() { ClassDB::bind_method(D_METHOD("agent_create"), &NavigationServer2D::agent_create); ClassDB::bind_method(D_METHOD("agent_set_map", "agent", "map"), &NavigationServer2D::agent_set_map); ClassDB::bind_method(D_METHOD("agent_get_map", "agent"), &NavigationServer2D::agent_get_map); - ClassDB::bind_method(D_METHOD("agent_set_neighbor_dist", "agent", "dist"), &NavigationServer2D::agent_set_neighbor_dist); + ClassDB::bind_method(D_METHOD("agent_set_neighbor_distance", "agent", "distance"), &NavigationServer2D::agent_set_neighbor_distance); ClassDB::bind_method(D_METHOD("agent_set_max_neighbors", "agent", "count"), &NavigationServer2D::agent_set_max_neighbors); ClassDB::bind_method(D_METHOD("agent_set_time_horizon", "agent", "time"), &NavigationServer2D::agent_set_time_horizon); ClassDB::bind_method(D_METHOD("agent_set_radius", "agent", "radius"), &NavigationServer2D::agent_set_radius); @@ -323,7 +323,7 @@ RID NavigationServer2D::agent_create() const { void FORWARD_2_C(agent_set_map, RID, p_agent, RID, p_map, rid_to_rid, rid_to_rid); -void FORWARD_2_C(agent_set_neighbor_dist, RID, p_agent, real_t, p_dist, rid_to_rid, real_to_real); +void FORWARD_2_C(agent_set_neighbor_distance, RID, p_agent, real_t, p_dist, rid_to_rid, real_to_real); void FORWARD_2_C(agent_set_max_neighbors, RID, p_agent, int, p_count, rid_to_rid, int_to_int); diff --git a/servers/navigation_server_2d.h b/servers/navigation_server_2d.h index 83271f990e..ca01c82940 100644 --- a/servers/navigation_server_2d.h +++ b/servers/navigation_server_2d.h @@ -133,7 +133,7 @@ public: /// time of the simulation. If the number is too /// low, the simulation will not be safe. /// Must be non-negative. - virtual void agent_set_neighbor_dist(RID p_agent, real_t p_dist) const; + virtual void agent_set_neighbor_distance(RID p_agent, real_t p_distance) const; /// The maximum number of other agents this /// agent takes into account in the navigation. diff --git a/servers/navigation_server_3d.cpp b/servers/navigation_server_3d.cpp index 115eda7b30..c8c26f9aab 100644 --- a/servers/navigation_server_3d.cpp +++ b/servers/navigation_server_3d.cpp @@ -79,7 +79,7 @@ void NavigationServer3D::_bind_methods() { ClassDB::bind_method(D_METHOD("agent_create"), &NavigationServer3D::agent_create); ClassDB::bind_method(D_METHOD("agent_set_map", "agent", "map"), &NavigationServer3D::agent_set_map); ClassDB::bind_method(D_METHOD("agent_get_map", "agent"), &NavigationServer3D::agent_get_map); - ClassDB::bind_method(D_METHOD("agent_set_neighbor_dist", "agent", "dist"), &NavigationServer3D::agent_set_neighbor_dist); + ClassDB::bind_method(D_METHOD("agent_set_neighbor_distance", "agent", "distance"), &NavigationServer3D::agent_set_neighbor_distance); ClassDB::bind_method(D_METHOD("agent_set_max_neighbors", "agent", "count"), &NavigationServer3D::agent_set_max_neighbors); ClassDB::bind_method(D_METHOD("agent_set_time_horizon", "agent", "time"), &NavigationServer3D::agent_set_time_horizon); ClassDB::bind_method(D_METHOD("agent_set_radius", "agent", "radius"), &NavigationServer3D::agent_set_radius); diff --git a/servers/navigation_server_3d.h b/servers/navigation_server_3d.h index f24c0117d1..79b0ea84b0 100644 --- a/servers/navigation_server_3d.h +++ b/servers/navigation_server_3d.h @@ -147,7 +147,7 @@ public: /// time of the simulation. If the number is too /// low, the simulation will not be safe. /// Must be non-negative. - virtual void agent_set_neighbor_dist(RID p_agent, real_t p_dist) const = 0; + virtual void agent_set_neighbor_distance(RID p_agent, real_t p_distance) const = 0; /// The maximum number of other agents this /// agent takes into account in the navigation. -- cgit v1.2.3