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

Unusual natural_light values #6

Open
Ezhh opened this issue Dec 27, 2017 · 3 comments
Open

Unusual natural_light values #6

Ezhh opened this issue Dec 27, 2017 · 3 comments

Comments

@Ezhh
Copy link
Owner

Ezhh commented Dec 27, 2017

This is likely to be a Minetest issue and not an issue with this mod:

natural_light is 1 (full daylight) when standing above surface dungeon:
screenshot_20171227_025710

natural_light is 0 (full darkness) when dropping down to stand in surface dungeon:
screenshot_20171227_025716
Note that this dungeon has a completely open top and there is no darkening of visible light.

This causes a quite sudden light reset for shadow_lands.

The same 1 to 0 jump can be replicated simply by digging directly down. At a certain height it is still 1, then one node deeper takes it to 0 with no in-between.

Note this has currently only been tested on stable, so need to see if it also happens in 0.5.

@rubenwardy
Copy link

Possible this is due to an incorrect reading position. The player position is on the player's foot, so you'll need to add an upward offset

@Ezhh
Copy link
Owner Author

Ezhh commented Dec 27, 2017

I tested whether the reading position is correct previously, and it definitely seems to be. I can test again, but if I raise it, it seems it will be at the level of the player's head (two nodes above the ground instead of one) which isn't what I wanted.

@Ezhh
Copy link
Owner Author

Ezhh commented Dec 27, 2017

Possible fix if current dev version doesn't fix it anyway:
local node_light = minetest.get_node_light(vector.add(player:get_pos(), { x = 0, y = 0.01, z = 0}), nil) or 15

(Thanks rubenwardy :D)

Need to test on a dev version from today or later for rounding commit which might help.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants