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:
@ -262,10 +262,10 @@ impl<'a> BlockGen<'a> {
|
|||||||
let block = if (wposf.z as f32) < height - grass_depth {
|
let block = if (wposf.z as f32) < height - grass_depth {
|
||||||
let col = Lerp::lerp(
|
let col = Lerp::lerp(
|
||||||
// saturate_srgb(sub_surface_color, 0.45).map(|e| (e * 255.0) as u8),
|
// saturate_srgb(sub_surface_color, 0.45).map(|e| (e * 255.0) as u8),
|
||||||
sub_surface_color.map(|e| (e * 255.0) as u8),
|
sub_surface_color,
|
||||||
stone_col,
|
stone_col.map(|e| e as f32 / 255.0),
|
||||||
(height - grass_depth - wposf.z as f32) * 0.15,
|
(height - grass_depth - wposf.z as f32) * 0.15,
|
||||||
);
|
).map(|e| (e * 255.0) as u8);
|
||||||
|
|
||||||
// Underground
|
// Underground
|
||||||
if (wposf.z as f32) > alt - 32.0 * chaos {
|
if (wposf.z as f32) > alt - 32.0 * chaos {
|
||||||
|
Reference in New Issue
Block a user