diff options
author | Sean <sean@geekotron.net> | 2022-10-02 13:18:33 -0600 |
---|---|---|
committer | Sean <sean@geekotron.net> | 2022-10-02 13:18:33 -0600 |
commit | 9b525da531d86fa6bc65c27c1bd68a1227d68f8f (patch) | |
tree | 0736d69f9f1c04de436db2fdd9752d0cf7db6a4e /modules/navigation | |
parent | abf473e2d022accdd5b7aa21d3e0b934b6ec0523 (diff) |
Fix crash in navigation 3d when target is not reachable
The code that resets variables to retry navigation to the closest possible poly was not resetting 1 variable, which caused it to exceed the vector bounds
Diffstat (limited to 'modules/navigation')
-rw-r--r-- | modules/navigation/nav_map.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/modules/navigation/nav_map.cpp b/modules/navigation/nav_map.cpp index 394c32f20d..83862e1e34 100644 --- a/modules/navigation/nav_map.cpp +++ b/modules/navigation/nav_map.cpp @@ -238,6 +238,7 @@ Vector<Vector3> NavMap::get_path(Vector3 p_origin, Vector3 p_destination, bool p to_visit.clear(); to_visit.push_back(0); least_cost_id = 0; + prev_least_cost_id = -1; reachable_end = nullptr; |