Skip to content

Commit

Permalink
Disable waypoint locking for maze
Browse files Browse the repository at this point in the history
  • Loading branch information
iMilchshake committed Nov 26, 2024
1 parent 2183e99 commit 4a732bc
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 8 deletions.
3 changes: 2 additions & 1 deletion data/gen_configs/maze.json
Original file line number Diff line number Diff line change
Expand Up @@ -76,5 +76,6 @@
"subwaypoint_max_shift_dist": 50.0,
"pos_lock_max_dist": 150.0,
"pos_lock_max_delay": 9999,
"lock_kernel_size": 1
"lock_kernel_size": 1,
"waypoint_lock_distance": 0
}
11 changes: 6 additions & 5 deletions data/gen_configs/maze2.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@
"shift_weights": {
"values": null,
"probs": [
0.64516133,
0.16129033,
0.12903227,
0.064516135
0.6451613,
0.16129032,
0.12903225,
0.06451613
]
},
"plat_min_distance": 40,
Expand Down Expand Up @@ -76,5 +76,6 @@
"subwaypoint_max_shift_dist": 60.0,
"pos_lock_max_dist": 90.0,
"pos_lock_max_delay": 2500,
"lock_kernel_size": 1
"lock_kernel_size": 1,
"waypoint_lock_distance": 0
}
6 changes: 4 additions & 2 deletions src/generator.rs
Original file line number Diff line number Diff line change
Expand Up @@ -152,8 +152,10 @@ impl Generator {
== Some(true)
{
self.walker.next_waypoint();
self.walker
.update_waypoint_locks(gen_config.waypoint_lock_distance, debug_layers);
if gen_config.waypoint_lock_distance > 0 {
self.walker
.update_waypoint_locks(gen_config.waypoint_lock_distance, debug_layers);
}
}

if !self.walker.finished {
Expand Down

0 comments on commit 4a732bc

Please sign in to comment.