Skip to content

Commit

Permalink
Merge pull request #80189 from zorbathut/pr_zeroupdateid
Browse files Browse the repository at this point in the history
Fix NavMesh `map_update_id` returning 0 results in errors.
  • Loading branch information
YuriSizov committed Aug 3, 2023
2 parents 1610fc2 + d0564f2 commit eb4301b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion modules/navigation/nav_map.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1060,7 +1060,8 @@ void NavMap::sync() {
}

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

// Do we have modified obstacle positions?
Expand Down

0 comments on commit eb4301b

Please sign in to comment.