summaryrefslogtreecommitdiff
path: root/servers/navigation_server_2d.cpp
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <remi@verschelde.fr>2022-06-24 10:13:07 +0200
committerGitHub <noreply@github.com>2022-06-24 10:13:07 +0200
commitfaae24637cdf8ce50e06e9968342003fcd2ca470 (patch)
treeac985c8d17c80dc0a80e0cc87ec8ee3d31ea6656 /servers/navigation_server_2d.cpp
parent49d87488481404606a1292c6a3f9c96b1c2122b6 (diff)
parentfdea2698053b616d0805ef3c4501a76945ce82ef (diff)
Merge pull request #62300 from smix8/navigation_map_force_update_4.x
Diffstat (limited to 'servers/navigation_server_2d.cpp')
-rw-r--r--servers/navigation_server_2d.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/servers/navigation_server_2d.cpp b/servers/navigation_server_2d.cpp
index 814ae0fa4e..5e9f1c824a 100644
--- a/servers/navigation_server_2d.cpp
+++ b/servers/navigation_server_2d.cpp
@@ -175,6 +175,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);
@@ -236,6 +238,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);