Add NavigationServer map_force_update() function
Adds map_force_update() function to NavigationServer. This function immediately flushes the Navigationserver command queue and recalculates all navigationmeshes and region connections for a specific map.
This commit is contained in:
parent
c18d0f2035
commit
fdea269805
8 changed files with 43 additions and 0 deletions
|
|
@ -173,6 +173,8 @@ void NavigationServer2D::_bind_methods() {
|
|||
ClassDB::bind_method(D_METHOD("map_get_regions", "map"), &NavigationServer2D::map_get_regions);
|
||||
ClassDB::bind_method(D_METHOD("map_get_agents", "map"), &NavigationServer2D::map_get_agents);
|
||||
|
||||
ClassDB::bind_method(D_METHOD("map_force_update", "map"), &NavigationServer2D::map_force_update);
|
||||
|
||||
ClassDB::bind_method(D_METHOD("region_create"), &NavigationServer2D::region_create);
|
||||
ClassDB::bind_method(D_METHOD("region_set_enter_cost", "region", "enter_cost"), &NavigationServer2D::region_set_enter_cost);
|
||||
ClassDB::bind_method(D_METHOD("region_get_enter_cost", "region"), &NavigationServer2D::region_get_enter_cost);
|
||||
|
|
@ -231,6 +233,10 @@ void FORWARD_2_C(map_set_active, RID, p_map, bool, p_active, rid_to_rid, bool_to
|
|||
|
||||
bool FORWARD_1_C(map_is_active, RID, p_map, rid_to_rid);
|
||||
|
||||
void NavigationServer2D::map_force_update(RID p_map) {
|
||||
NavigationServer3D::get_singleton_mut()->map_force_update(p_map);
|
||||
}
|
||||
|
||||
void FORWARD_2_C(map_set_cell_size, RID, p_map, real_t, p_cell_size, rid_to_rid, real_to_real);
|
||||
real_t FORWARD_1_C(map_get_cell_size, RID, p_map, rid_to_rid);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue