mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
Convert to chunk positions for downhill
This commit is contained in:
parent
a4573f6fb2
commit
6e2784ba0e
@ -1465,7 +1465,12 @@ impl WorldSim {
|
||||
const MAX_ITERS: usize = 64;
|
||||
for _ in 0..MAX_ITERS {
|
||||
match this.get(pos)?.downhill {
|
||||
Some(downhill) => pos = downhill,
|
||||
Some(downhill) => {
|
||||
pos = downhill
|
||||
.map2(Vec2::from(TerrainChunkSize::RECT_SIZE), |e, sz: u32| {
|
||||
e / (sz as i32)
|
||||
})
|
||||
}
|
||||
None => return Some(pos),
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user