Fix skybox underground add screenshot

This commit is contained in:
Juraj Vajda 2023-02-17 17:59:20 -05:00
parent e5c4dbb122
commit 5a425ae7e8
2 changed files with 6 additions and 4 deletions

BIN
screenshot.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 MiB

View File

@ -83,12 +83,13 @@ minetest.register_globalstep(function(dtime)
end
end
if player_pos.y <= -256 and is_underground == 0 and player_biome_name ~= biome_name then
if player_pos.y <= -256 and is_underground == 0 or (is_underground ~= 0 and player_biome_name ~= biome_name) then
-- hide sun, moon, stars ... underground
player_meta:set_int('everness_is_underground', 1)
player:set_sun({
visible = false
visible = false,
sunrise_visible = false
})
player:set_moon({
@ -99,7 +100,7 @@ minetest.register_globalstep(function(dtime)
visible = false
})
elseif player_pos.y > -256 and is_underground == 1 and player_biome_name ~= biome_name then
elseif player_pos.y > -256 and is_underground ~= 0 or (is_underground == 0 and player_biome_name ~= biome_name) then
-- show sun, moon, stars ... underground
player_meta:set_int('everness_is_underground', 0)
@ -112,7 +113,8 @@ minetest.register_globalstep(function(dtime)
})
player:set_stars({
visible = true
visible = true,
sunrise_visible = true
})
end
end