From cb4c3eb34efdd44fe2f363aca58ad4c5428bc3be Mon Sep 17 00:00:00 2001 From: Avi Weinstock Date: Mon, 29 Nov 2021 14:39:56 -0500 Subject: [PATCH] Bodies of water no longer contain black chunks on the voxel minimap. The heuristic for pruning dungeon ceilings depended on detecting an air-to-not-air edge, which was not present for chunks whose topmost layer was water. Sampling 1 layer of the `above` block introduces such an edge, allowing the water surface to be detected. --- CHANGELOG.md | 1 + voxygen/src/hud/minimap.rs | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2627375115..f7b124f829 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -55,6 +55,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Many know water generation problems - Trading over long distances using ghost characters or client-side exploits is no longer possible - Merchant cost percentages displayed as floored, whole numbers +- Bodies of water no longer contain black chunks on the voxel minimap. ## [0.11.0] - 2021-09-11 diff --git a/voxygen/src/hud/minimap.rs b/voxygen/src/hud/minimap.rs index 47f89059e0..e304019165 100644 --- a/voxygen/src/hud/minimap.rs +++ b/voxygen/src/hud/minimap.rs @@ -83,7 +83,7 @@ impl VoxelMinimap { /// Each layer is a slice of the terrain near that z-level fn composite_layer_slice(chunk: &TerrainChunk, layers: &mut Vec, bool)>>) { - for z in chunk.get_min_z()..chunk.get_max_z() { + for z in chunk.get_min_z()..=chunk.get_max_z() { let grid = Grid::populate_from(Vec2::new(32, 32), |v| { let mut rgba = Rgba::::zero(); let (weights, zoff) = (&[1, 2, 4, 1, 1, 1][..], -2); @@ -104,7 +104,7 @@ impl VoxelMinimap { /// Each layer is the overhead as if its z-level were the ceiling fn composite_layer_overhead(chunk: &TerrainChunk, layers: &mut Vec, bool)>>) { - for z in chunk.get_min_z()..chunk.get_max_z() { + for z in chunk.get_min_z()..=chunk.get_max_z() { let grid = Grid::populate_from(Vec2::new(32, 32), |v| { let mut rgba = None;