Extex101 / light_tool

Adds a Torch/Flashlight that emits a beam of light to Minetest
Other
9 stars 1 forks source link

Place light nodes precisely, without vector.floor() #5

Closed doxygen-spammer closed 3 years ago

doxygen-spammer commented 3 years ago

This avoids flickering flashlights when the player stands very close to a wall. Flickering happened probably because floor() moved the position to a node corner, and then minetest.get_node() and minetest.set_node() operated on an adjacent node, which is not lightable because it is part of the wall.

doxygen-spammer commented 3 years ago

light_tool.directional_pos() is now unused. Is it part of the API so it should stay, or is it useless now?

Extex101 commented 3 years ago

I'm too lazy to test, but if you're able to confirm this has been tested I'll merge 👍

doxygen-spammer commented 3 years ago

I tested it myself. Do you want an independent test, i. e. by someone else?

Extex101 commented 3 years ago

No I'll take your word for it