Skip to content

Commit 0d6c1c3

Browse files
committed
Merge pull request #109196 from smix8/pppedgecentered
Fix path post-processing edgecentered
2 parents a6e6d13 + a3f393a commit 0d6c1c3

File tree

6 files changed

+6
-0
lines changed

6 files changed

+6
-0
lines changed

modules/navigation_2d/2d/nav_map_builder_2d.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,7 @@ void NavMapBuilder2D::_build_step_find_edge_connection_pairs(NavMapIterationBuil
126126
// Add the polygon/edge tuple to this key.
127127
Connection new_connection;
128128
new_connection.polygon = &region->navmesh_polygons[connectable_edge.polygon_index];
129+
new_connection.edge = connectable_edge.edge;
129130
new_connection.pathway_start = connectable_edge.pathway_start;
130131
new_connection.pathway_end = connectable_edge.pathway_end;
131132

modules/navigation_2d/2d/nav_region_builder_2d.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -241,6 +241,7 @@ void NavRegionBuilder2D::_build_step_merge_edge_connection_pairs(NavRegionIterat
241241
ConnectableEdge ce;
242242
ce.ek = pair_it.key;
243243
ce.polygon_index = connection.polygon->id;
244+
ce.edge = connection.edge;
244245
ce.pathway_start = connection.pathway_start;
245246
ce.pathway_end = connection.pathway_end;
246247

modules/navigation_2d/nav_utils_2d.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,7 @@ struct EdgeKey {
7575
struct ConnectableEdge {
7676
EdgeKey ek;
7777
uint32_t polygon_index;
78+
int edge = -1;
7879
Vector2 pathway_start;
7980
Vector2 pathway_end;
8081
};

modules/navigation_3d/3d/nav_map_builder_3d.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,7 @@ void NavMapBuilder3D::_build_step_find_edge_connection_pairs(NavMapIterationBuil
127127
// Add the polygon/edge tuple to this key.
128128
Connection new_connection;
129129
new_connection.polygon = &region->navmesh_polygons[connectable_edge.polygon_index];
130+
new_connection.edge = connectable_edge.edge;
130131
new_connection.pathway_start = connectable_edge.pathway_start;
131132
new_connection.pathway_end = connectable_edge.pathway_end;
132133

modules/navigation_3d/3d/nav_region_builder_3d.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -242,6 +242,7 @@ void NavRegionBuilder3D::_build_step_merge_edge_connection_pairs(NavRegionIterat
242242
ConnectableEdge ce;
243243
ce.ek = pair_it.key;
244244
ce.polygon_index = connection.polygon->id;
245+
ce.edge = connection.edge;
245246
ce.pathway_start = connection.pathway_start;
246247
ce.pathway_end = connection.pathway_end;
247248

modules/navigation_3d/nav_utils_3d.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,7 @@ struct EdgeKey {
7676
struct ConnectableEdge {
7777
EdgeKey ek;
7878
uint32_t polygon_index;
79+
int edge = -1;
7980
Vector3 pathway_start;
8081
Vector3 pathway_end;
8182
};

0 commit comments

Comments
 (0)