mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
Waypoints are no longer placed underwater
This commit is contained in:
parent
bf9dbee14a
commit
a29ce3c428
@ -1635,6 +1635,10 @@ impl WorldSim {
|
|||||||
.filter_map(|(i, j)| {
|
.filter_map(|(i, j)| {
|
||||||
let mut pos = Vec2::new(i as i32, j as i32);
|
let mut pos = Vec2::new(i as i32, j as i32);
|
||||||
let mut chunk = this.get(pos)?;
|
let mut chunk = this.get(pos)?;
|
||||||
|
|
||||||
|
if chunk.is_underwater() {
|
||||||
|
return None;
|
||||||
|
}
|
||||||
// Slide the waypoints down hills
|
// Slide the waypoints down hills
|
||||||
const MAX_ITERS: usize = 64;
|
const MAX_ITERS: usize = 64;
|
||||||
for _ in 0..MAX_ITERS {
|
for _ in 0..MAX_ITERS {
|
||||||
|
Loading…
Reference in New Issue
Block a user