Skip to content

Commit eb4301b

Browse files
committed
Merge pull request #80189 from zorbathut/pr_zeroupdateid
Fix NavMesh `map_update_id` returning 0 results in errors.
2 parents 1610fc2 + d0564f2 commit eb4301b

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

modules/navigation/nav_map.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1060,7 +1060,8 @@ void NavMap::sync() {
10601060
}
10611061

10621062
// Update the update ID.
1063-
map_update_id = (map_update_id + 1) % 9999999;
1063+
// Some code treats 0 as a failure case, so we avoid returning 0.
1064+
map_update_id = map_update_id % 9999999 + 1;
10641065
}
10651066

10661067
// Do we have modified obstacle positions?

0 commit comments

Comments
 (0)