Update flashlight.lua

This commit is contained in:
Panquesito7 2019-08-22 21:42:24 -05:00 committed by GitHub
parent 0674bbea19
commit 89ae743f52
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -55,7 +55,7 @@ end
minetest.register_on_joinplayer(function(player) minetest.register_on_joinplayer(function(player)
local player_name = player:get_player_name() local player_name = player:get_player_name()
local pos = player:getpos() local pos = player:get_pos()
local rounded_pos = vector.round(pos) local rounded_pos = vector.round(pos)
rounded_pos.y = rounded_pos.y + 1 rounded_pos.y = rounded_pos.y + 1
player_positions[player_name] = rounded_pos player_positions[player_name] = rounded_pos
@ -77,7 +77,7 @@ minetest.register_globalstep(function(dtime)
for i, player in pairs(minetest.get_connected_players()) do for i, player in pairs(minetest.get_connected_players()) do
local player_name = player:get_player_name() local player_name = player:get_player_name()
local flashlight_weared = check_for_flashlight(player) local flashlight_weared = check_for_flashlight(player)
local pos = player:getpos() local pos = player:get_pos()
local rounded_pos = vector.round(pos) local rounded_pos = vector.round(pos)
rounded_pos.y = rounded_pos.y + 1 rounded_pos.y = rounded_pos.y + 1
local old_pos = player_positions[player_name] local old_pos = player_positions[player_name]