Replace deprecated functions with newer ones

These commits create compatibility with MT/MTG 5.0.0+.
However, these commits may/will break with the 0.4-series.
This commit is contained in:
Panquesito7
2019-06-16 13:30:56 -05:00
committed by sfan5
parent 40b49ee9bc
commit 3ffecdd9c4
9 changed files with 16 additions and 5 deletions

View File

@ -149,7 +149,7 @@ end
-- Return the marker that is closest to the player
worldedit.marker_get_closest_to_player = function(name)
local playerpos = minetest.get_player_by_name(name):getpos()
local playerpos = minetest.get_player_by_name(name):get_pos()
local dist1 = vector.distance(playerpos, worldedit.pos1[name])
local dist2 = vector.distance(playerpos, worldedit.pos2[name])
@ -255,4 +255,4 @@ worldedit.translate_direction = function(name, direction)
end
return resaxis, resdir
end
end