forked from Mineclonia/Mineclonia
Display large player dot on maps for nearby player
This commit is contained in:
parent
e24a38d864
commit
82a5708144
|
@ -324,18 +324,36 @@ minetest.register_globalstep(function(dtime)
|
||||||
local marker
|
local marker
|
||||||
|
|
||||||
if pos.x < minp.x then
|
if pos.x < minp.x then
|
||||||
marker = "mcl_maps_player_dot.png"
|
if minp.x - pos.x < 256 then
|
||||||
|
marker = "mcl_maps_player_dot_large.png"
|
||||||
|
else
|
||||||
|
marker = "mcl_maps_player_dot.png"
|
||||||
|
end
|
||||||
pos.x = minp.x
|
pos.x = minp.x
|
||||||
elseif pos.x > maxp.x then
|
elseif pos.x > maxp.x then
|
||||||
marker = "mcl_maps_player_dot.png"
|
if pos.x - maxp.x < 256 then
|
||||||
|
marker = "mcl_maps_player_dot_large.png"
|
||||||
|
else
|
||||||
|
marker = "mcl_maps_player_dot.png"
|
||||||
|
end
|
||||||
pos.x = maxp.x
|
pos.x = maxp.x
|
||||||
end
|
end
|
||||||
|
|
||||||
|
-- we never override the small marker
|
||||||
|
-- yes, this is a literal corner case
|
||||||
if pos.z < minp.z then
|
if pos.z < minp.z then
|
||||||
marker = "mcl_maps_player_dot.png"
|
if minp.z - pos.z < 256 and marker ~= "mcl_maps_player_dot.png" then
|
||||||
|
marker = "mcl_maps_player_dot_large.png"
|
||||||
|
else
|
||||||
|
marker = "mcl_maps_player_dot.png"
|
||||||
|
end
|
||||||
pos.z = minp.z
|
pos.z = minp.z
|
||||||
elseif pos.z > maxp.z then
|
elseif pos.z > maxp.z then
|
||||||
marker = "mcl_maps_player_dot.png"
|
if pos.z - maxp.z < 256 and marker ~= "mcl_maps_player_dot.png" then
|
||||||
|
marker = "mcl_maps_player_dot_large.png"
|
||||||
|
else
|
||||||
|
marker = "mcl_maps_player_dot.png"
|
||||||
|
end
|
||||||
pos.z = maxp.z
|
pos.z = maxp.z
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Binary file not shown.
Before Width: | Height: | Size: 96 B After Width: | Height: | Size: 94 B |
Binary file not shown.
After Width: | Height: | Size: 101 B |
Loading…
Reference in New Issue