mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
Better pet pathfinding
This commit is contained in:
parent
86728c714f
commit
7af1b45d5f
@ -458,7 +458,7 @@ where
|
||||
let is_walkable = |pos: &Vec3<i32>| walkable(vol, *pos);
|
||||
let get_walkable_z = |pos| {
|
||||
let mut z_incr = 0;
|
||||
for _ in 0..32 {
|
||||
for _ in 0..128 {
|
||||
let test_pos = pos + Vec3::unit_z() * z_incr;
|
||||
if is_walkable(&test_pos) {
|
||||
return Some(test_pos);
|
||||
|
Loading…
Reference in New Issue
Block a user