mirror of
https://github.com/minetest-mods/technic.git
synced 2024-11-18 08:10:48 +01:00
Update flashlight.lua
This commit is contained in:
parent
0674bbea19
commit
89ae743f52
@ -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]
|
||||||
|
Loading…
Reference in New Issue
Block a user