Skip to content

Commit

Permalink
make /mars_lightup more reliable (#3)
Browse files Browse the repository at this point in the history
Sometimes nothing happens when standing at a certain pos. With rounded pos, standing at the same position it works perfectly.
  • Loading branch information
SwissalpS committed Feb 17, 2022
1 parent 2fee858 commit 20f7465
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion light_restore_command.lua
Expand Up @@ -3,7 +3,7 @@ minetest.register_chatcommand("mars_lightup", {
description = "restores the airlights on mars around the player position",
func = function(name)
local player = minetest.get_player_by_name(name)
local pos = player:get_pos()
local pos = vector.round(player:get_pos())

if not planet_mars.is_pos_on_mars(pos) then
-- TODO: only light up in mars _caves_
Expand Down

0 comments on commit 20f7465

Please sign in to comment.