1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-08 12:40:44 +00:00

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.

(cherry picked from commit fdea269805)
This commit is contained in:
smix8
2022-06-22 10:16:38 +02:00
committed by Rémi Verschelde
parent f0069cc1e9
commit 721c99a530
8 changed files with 41 additions and 0 deletions

View File

@@ -619,6 +619,15 @@ void GodotNavigationServer::flush_queries() {
commands.clear();
}
void GodotNavigationServer::map_force_update(RID p_map) {
NavMap *map = map_owner.getornull(p_map);
ERR_FAIL_COND(map == nullptr);
flush_queries();
map->sync();
}
void GodotNavigationServer::process(real_t p_delta_time) {
flush_queries();