Apply light level to player position marker
This commit is contained in:
parent
bc34ba34e8
commit
4538171d56
10
init.lua
10
init.lua
|
@ -622,7 +622,6 @@ maps.show_map_hud = function(player)
|
|||
"text",
|
||||
texture .. light_level_overlay
|
||||
)
|
||||
maps.dark[player_name] = darkness
|
||||
maps.maps[player_name] = texture
|
||||
end
|
||||
|
||||
|
@ -694,11 +693,14 @@ maps.show_map_hud = function(player)
|
|||
end
|
||||
end
|
||||
|
||||
if marker and marker ~= maps.mark[player_name] then
|
||||
if marker and (
|
||||
marker ~= maps.mark[player_name] or
|
||||
darkness ~= maps.dark[player_name]
|
||||
) then
|
||||
player:hud_change(
|
||||
maps.huds[player_name].pos,
|
||||
"text",
|
||||
marker
|
||||
marker .. light_level_overlay
|
||||
)
|
||||
maps.mark[player_name] = marker
|
||||
end
|
||||
|
@ -720,6 +722,8 @@ maps.show_map_hud = function(player)
|
|||
maps.marx[player_name] = marker_x
|
||||
maps.mary[player_name] = marker_y
|
||||
end
|
||||
|
||||
maps.dark[player_name] = darkness
|
||||
end
|
||||
|
||||
local time_elapsed = 0
|
||||
|
|
Loading…
Reference in New Issue