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
Luke aka SwissalpS 2022-02-17 07:26:10 +01:00 committed by GitHub
parent 2fee858238
commit 20f7465eb5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -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_