You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-04 12:00:25 +00:00
Prevent unnecessary navigation map synchronizations
Prevents unnecessary navigation map synchronizations triggered by redundant calls to setters of e.g. region, link or map properties.
This commit is contained in:
@@ -54,21 +54,33 @@
|
||||
}
|
||||
|
||||
void NavMap::set_up(Vector3 p_up) {
|
||||
if (up == p_up) {
|
||||
return;
|
||||
}
|
||||
up = p_up;
|
||||
regenerate_polygons = true;
|
||||
}
|
||||
|
||||
void NavMap::set_cell_size(real_t p_cell_size) {
|
||||
if (cell_size == p_cell_size) {
|
||||
return;
|
||||
}
|
||||
cell_size = p_cell_size;
|
||||
regenerate_polygons = true;
|
||||
}
|
||||
|
||||
void NavMap::set_edge_connection_margin(real_t p_edge_connection_margin) {
|
||||
if (edge_connection_margin == p_edge_connection_margin) {
|
||||
return;
|
||||
}
|
||||
edge_connection_margin = p_edge_connection_margin;
|
||||
regenerate_links = true;
|
||||
}
|
||||
|
||||
void NavMap::set_link_connection_radius(real_t p_link_connection_radius) {
|
||||
if (link_connection_radius == p_link_connection_radius) {
|
||||
return;
|
||||
}
|
||||
link_connection_radius = p_link_connection_radius;
|
||||
regenerate_links = true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user