Fix NavMesh `map_update_id` returning 0 results in errors

This commit is contained in:
Ben Rog-Wilhelm 2023-08-02 16:29:31 -05:00 committed by Rémi Verschelde
parent f9f5041675
commit d0564f2466
No known key found for this signature in database
GPG Key ID: C3336907360768E1
1 changed files with 2 additions and 1 deletions

View File

@ -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?