make /mars_lightup more reliable (#3)
Sometimes nothing happens when standing at a certain pos. With rounded pos, standing at the same position it works perfectly.master
parent
2fee858238
commit
20f7465eb5
|
@ -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_
|
||||
|
|
Loading…
Reference in New Issue