minor
This commit is contained in:
+5
-1
@@ -86,7 +86,7 @@ pub fn calculate_visibility(pos: IVec3, tilemap: &TileMap) -> [u32; 8] {
|
||||
|
||||
let mut is_occluded = false;
|
||||
|
||||
'vertical_check: for z_offset in 1..=35 {
|
||||
'vertical_check: for z_offset in 1..5 {
|
||||
let above_pos = IVec3::new(pos.x, pos.y, pos.z + (z_offset * tile_size));
|
||||
if above_pos.z <= camera_z {
|
||||
if let Some(&(_, opaque, _, _, _)) = tilemap.floor_tiles.get(&above_pos) {
|
||||
@@ -95,6 +95,10 @@ pub fn calculate_visibility(pos: IVec3, tilemap: &TileMap) -> [u32; 8] {
|
||||
break 'vertical_check;
|
||||
}
|
||||
}
|
||||
if z_offset >= 4 {
|
||||
is_occluded = true;
|
||||
break 'vertical_check;
|
||||
}
|
||||
// if let Some(&(_, solid, _)) = tilemap.fixtures.get(&above_pos) {
|
||||
// if solid {
|
||||
// is_occluded = true;
|
||||
|
||||
Reference in New Issue
Block a user