You've already forked godot
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:
@@ -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();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user