mirror of
https://github.com/Relintai/pandemonium_engine.git
synced 2024-12-23 04:16:50 +01:00
Fix crash in GodotNavigationServer::map_get_path
, fixes #60413
This commit is contained in:
parent
1e0353e179
commit
cf84a36352
@ -158,10 +158,10 @@ Vector<Vector3> NavMap::get_path(Vector3 p_origin, Vector3 p_destination, bool p
|
||||
|
||||
while (found_route == false) {
|
||||
{
|
||||
gd::NavigationPoly *least_cost_poly = &navigation_polys[least_cost_id];
|
||||
|
||||
// Takes the current least_cost_poly neighbors and compute the traveled_distance of each
|
||||
for (size_t i = 0; i < navigation_polys[least_cost_id].poly->edges.size(); i++) {
|
||||
gd::NavigationPoly *least_cost_poly = &navigation_polys[least_cost_id];
|
||||
|
||||
const gd::Edge &edge = least_cost_poly->poly->edges[i];
|
||||
if (!edge.other_polygon)
|
||||
continue;
|
||||
|
Loading…
Reference in New Issue
Block a user