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

@ -638,7 +638,7 @@ function worldedit.clear_objects(pos1, pos2)
-- Avoid players and WorldEdit entities
if not obj:is_player() and (not entity or
not entity.name:find("^worldedit:")) then
local pos = obj:getpos()
local pos = obj:get_pos()
if pos.x >= pos1x and pos.x <= pos2x and
pos.y >= pos1y and pos.y <= pos2y and
pos.z >= pos1z and pos.z <= pos2z then