mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
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.
This commit is contained in:
parent
55be707c7b
commit
cb4c3eb34e
@ -55,6 +55,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|||||||
- Many know water generation problems
|
- Many know water generation problems
|
||||||
- Trading over long distances using ghost characters or client-side exploits is no longer possible
|
- Trading over long distances using ghost characters or client-side exploits is no longer possible
|
||||||
- Merchant cost percentages displayed as floored, whole numbers
|
- 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
|
## [0.11.0] - 2021-09-11
|
||||||
|
|
||||||
|
@ -83,7 +83,7 @@ impl VoxelMinimap {
|
|||||||
|
|
||||||
/// Each layer is a slice of the terrain near that z-level
|
/// Each layer is a slice of the terrain near that z-level
|
||||||
fn composite_layer_slice(chunk: &TerrainChunk, layers: &mut Vec<Grid<(Rgba<u8>, bool)>>) {
|
fn composite_layer_slice(chunk: &TerrainChunk, layers: &mut Vec<Grid<(Rgba<u8>, 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 grid = Grid::populate_from(Vec2::new(32, 32), |v| {
|
||||||
let mut rgba = Rgba::<f32>::zero();
|
let mut rgba = Rgba::<f32>::zero();
|
||||||
let (weights, zoff) = (&[1, 2, 4, 1, 1, 1][..], -2);
|
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
|
/// Each layer is the overhead as if its z-level were the ceiling
|
||||||
fn composite_layer_overhead(chunk: &TerrainChunk, layers: &mut Vec<Grid<(Rgba<u8>, bool)>>) {
|
fn composite_layer_overhead(chunk: &TerrainChunk, layers: &mut Vec<Grid<(Rgba<u8>, 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 grid = Grid::populate_from(Vec2::new(32, 32), |v| {
|
||||||
let mut rgba = None;
|
let mut rgba = None;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user