Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix sky color when returning to surface. #7

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions skybox.lua
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ minetest.register_globalstep(function(dtime)

-- Earth
if pos.y < space_low and current ~= "earth" then
player:set_sky({}, "regular", {})
player:set_sky({type = "regular"})
player:set_clouds({density = 0.4})
player_list[name] = "earth"
if otherworlds.settings.gravity.enable then
Expand All @@ -57,7 +57,7 @@ minetest.register_globalstep(function(dtime)

-- Outerspace
elseif pos.y > space_low and pos.y < space_high and current ~= "space" then
player:set_sky({}, "skybox", spaceskybox)
player:set_sky({type = "skybox", textures = spaceskybox})
player:set_clouds({density = 0})
player_list[name] = "space"
if otherworlds.settings.gravity.enable then
Expand All @@ -66,7 +66,7 @@ minetest.register_globalstep(function(dtime)

-- Redsky
elseif pos.y > redsky_low and pos.y < redsky_high and current ~= "redsky" then
player:set_sky({}, "skybox", redskybox)
player:set_sky({type = "skybox", textures = redskybox})
player:set_clouds({density = 0})
player_list[name] = "redsky"
if otherworlds.settings.gravity.enable then
Expand All @@ -75,7 +75,7 @@ minetest.register_globalstep(function(dtime)

-- Everything else (blackness)
elseif pos.y > redsky_high and current ~= "blackness" then
player:set_sky(000000, "plain", {})
player:set_sky({base_color = "#000000", type = "plain"})
player:set_clouds({density = 0})
player_list[name] = "blackness"
if otherworlds.settings.gravity.enable then
Expand Down