mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
Fix overflow issue with basement.
This commit is contained in:
parent
d0cfdb34aa
commit
8d5a5af2cb
@ -262,10 +262,10 @@ impl<'a> BlockGen<'a> {
|
||||
let block = if (wposf.z as f32) < height - grass_depth {
|
||||
let col = Lerp::lerp(
|
||||
// saturate_srgb(sub_surface_color, 0.45).map(|e| (e * 255.0) as u8),
|
||||
sub_surface_color.map(|e| (e * 255.0) as u8),
|
||||
stone_col,
|
||||
sub_surface_color,
|
||||
stone_col.map(|e| e as f32 / 255.0),
|
||||
(height - grass_depth - wposf.z as f32) * 0.15,
|
||||
);
|
||||
).map(|e| (e * 255.0) as u8);
|
||||
|
||||
// Underground
|
||||
if (wposf.z as f32) > alt - 32.0 * chaos {
|
||||
|
Loading…
Reference in New Issue
Block a user