mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
fix leftovers from toolchain update
This commit is contained in:
parent
8a6e79c249
commit
4a1404cd71
@ -1003,8 +1003,7 @@ impl Client {
|
||||
}
|
||||
|
||||
pub fn set_lod_distance(&mut self, lod_distance: u32) {
|
||||
#[allow(clippy::manual_clamp)]
|
||||
let lod_distance = lod_distance.max(0).min(1000) as f32 / lod::ZONE_SIZE as f32;
|
||||
let lod_distance = lod_distance.clamp(0, 1000) as f32 / lod::ZONE_SIZE as f32;
|
||||
self.lod_distance = lod_distance;
|
||||
}
|
||||
|
||||
|
@ -71,7 +71,7 @@ impl<V, S: VolSize, M> Chunk<V, S, M> {
|
||||
Self::GROUP_VOLUME / (Self::GROUP_LONG_SIDE_LEN * Self::GROUP_LONG_SIDE_LEN),
|
||||
);
|
||||
const GROUP_VOLUME: u32 = [Self::VOLUME / 256, 1][(Self::VOLUME < 256) as usize];
|
||||
const VOLUME: u32 = (S::SIZE.x * S::SIZE.y * S::SIZE.z);
|
||||
const VOLUME: u32 = S::SIZE.x * S::SIZE.y * S::SIZE.z;
|
||||
|
||||
/// Creates a new `Chunk` with the provided dimensions and all voxels filled
|
||||
/// with duplicates of the provided voxel.
|
||||
|
@ -263,7 +263,7 @@ impl<'a> Sampler<'a> for ColumnGen<'a> {
|
||||
) {
|
||||
let water_chunk = posj.map(|e| e as f64);
|
||||
let lake_width_noise =
|
||||
sim.gen_ctx.small_nz.get((wposf.div(32.0)).into_array());
|
||||
sim.gen_ctx.small_nz.get(wposf.div(32.0).into_array());
|
||||
let water_aabr = Aabr {
|
||||
min: water_chunk * neighbor_coef + 4.0 - lake_width_noise * 8.0,
|
||||
max: (water_chunk + 1.0) * neighbor_coef - 4.0
|
||||
@ -312,7 +312,7 @@ impl<'a> Sampler<'a> for ColumnGen<'a> {
|
||||
RiverKind::Ocean => {
|
||||
let water_chunk = posj.map(|e| e as f64);
|
||||
let lake_width_noise =
|
||||
sim.gen_ctx.small_nz.get((wposf.div(32.0)).into_array());
|
||||
sim.gen_ctx.small_nz.get(wposf.div(32.0).into_array());
|
||||
let water_aabr = Aabr {
|
||||
min: water_chunk * neighbor_coef + 4.0 - lake_width_noise * 8.0,
|
||||
max: (water_chunk + 1.0) * neighbor_coef - 4.0 + lake_width_noise * 8.0,
|
||||
|
Loading…
Reference in New Issue
Block a user