mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
Removed dead code
This commit is contained in:
parent
81b93b548e
commit
7b807ed34c
@ -127,25 +127,6 @@ fn calc_light<V: RectRasterableVol<Vox = Block> + ReadVol + Debug>(
|
|||||||
let pos = Vec3::new(pos.0 as i32, pos.1 as i32, pos.2 as i32);
|
let pos = Vec3::new(pos.0 as i32, pos.1 as i32, pos.2 as i32);
|
||||||
let light = light_map[lm_idx(pos.x, pos.y, pos.z)];
|
let light = light_map[lm_idx(pos.x, pos.y, pos.z)];
|
||||||
|
|
||||||
// If ray propagate downwards at full strength
|
|
||||||
if is_sunlight && light == SUNLIGHT && false {
|
|
||||||
// Down is special cased and we know up is a ray
|
|
||||||
// Special cased ray propagation
|
|
||||||
let pos = Vec3::new(pos.x, pos.y, pos.z - 1);
|
|
||||||
let (is_air, is_liquid) = vol_cached
|
|
||||||
.get(outer.min + pos)
|
|
||||||
.ok()
|
|
||||||
.map_or((false, false), |b| (b.is_air(), b.is_liquid()));
|
|
||||||
light_map[lm_idx(pos.x, pos.y, pos.z)] = if is_air {
|
|
||||||
prop_que.push_back((pos.x as u8, pos.y as u8, pos.z as u16));
|
|
||||||
SUNLIGHT
|
|
||||||
} else if is_liquid {
|
|
||||||
prop_que.push_back((pos.x as u8, pos.y as u8, pos.z as u16));
|
|
||||||
SUNLIGHT - 1
|
|
||||||
} else {
|
|
||||||
OPAQUE
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
// Up
|
// Up
|
||||||
// Bounds checking
|
// Bounds checking
|
||||||
if pos.z + 1 < outer.size().d {
|
if pos.z + 1 < outer.size().d {
|
||||||
@ -167,7 +148,6 @@ fn calc_light<V: RectRasterableVol<Vox = Block> + ReadVol + Debug>(
|
|||||||
&mut vol_cached,
|
&mut vol_cached,
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
|
||||||
// The XY directions
|
// The XY directions
|
||||||
if pos.y + 1 < outer.size().h {
|
if pos.y + 1 < outer.size().h {
|
||||||
propagate(
|
propagate(
|
||||||
|
Loading…
Reference in New Issue
Block a user