You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-08 12:40:44 +00:00
Only repath a NavigationAgent with a target position
Only repaths a NavigationAgent with a target position.
This commit is contained in:
@@ -416,7 +416,9 @@ void NavigationAgent2D::set_navigation_layers(uint32_t p_navigation_layers) {
|
|||||||
|
|
||||||
navigation_layers = p_navigation_layers;
|
navigation_layers = p_navigation_layers;
|
||||||
|
|
||||||
|
if (target_position_submitted) {
|
||||||
_request_repath();
|
_request_repath();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
uint32_t NavigationAgent2D::get_navigation_layers() const {
|
uint32_t NavigationAgent2D::get_navigation_layers() const {
|
||||||
@@ -535,7 +537,9 @@ void NavigationAgent2D::set_navigation_map(RID p_navigation_map) {
|
|||||||
map_override = p_navigation_map;
|
map_override = p_navigation_map;
|
||||||
|
|
||||||
NavigationServer2D::get_singleton()->agent_set_map(agent, map_override);
|
NavigationServer2D::get_singleton()->agent_set_map(agent, map_override);
|
||||||
|
if (target_position_submitted) {
|
||||||
_request_repath();
|
_request_repath();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
RID NavigationAgent2D::get_navigation_map() const {
|
RID NavigationAgent2D::get_navigation_map() const {
|
||||||
|
|||||||
@@ -453,7 +453,9 @@ void NavigationAgent3D::set_navigation_layers(uint32_t p_navigation_layers) {
|
|||||||
|
|
||||||
navigation_layers = p_navigation_layers;
|
navigation_layers = p_navigation_layers;
|
||||||
|
|
||||||
|
if (target_position_submitted) {
|
||||||
_request_repath();
|
_request_repath();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
uint32_t NavigationAgent3D::get_navigation_layers() const {
|
uint32_t NavigationAgent3D::get_navigation_layers() const {
|
||||||
@@ -572,7 +574,9 @@ void NavigationAgent3D::set_navigation_map(RID p_navigation_map) {
|
|||||||
map_override = p_navigation_map;
|
map_override = p_navigation_map;
|
||||||
|
|
||||||
NavigationServer3D::get_singleton()->agent_set_map(agent, map_override);
|
NavigationServer3D::get_singleton()->agent_set_map(agent, map_override);
|
||||||
|
if (target_position_submitted) {
|
||||||
_request_repath();
|
_request_repath();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
RID NavigationAgent3D::get_navigation_map() const {
|
RID NavigationAgent3D::get_navigation_map() const {
|
||||||
|
|||||||
Reference in New Issue
Block a user