Force tokens to keep some distance from the outer walls as well

This commit is contained in:
Manuel Vögele
2022-02-15 17:54:19 +01:00
parent 3c9a86647e
commit 61c48dff5e
+6 -3
View File
@@ -188,14 +188,17 @@ impl Pathfinder {
if angle_diff <= PI {
continue;
}
if angle_diff > 1.5 * PI {
{
let angle_between = angle_diff / 2.0 + angle1;
nodes.push(calc_pathfinding_node(
let pathfinding_node = calc_pathfinding_node(
point,
angle_between,
distance_from_walls,
&mut line_segments,
));
);
if angle_diff > 1.5 * PI {
nodes.push(pathfinding_node);
}
}
nodes.push(calc_pathfinding_node(
point,