summaryrefslogtreecommitdiff
path: root/drive_entity.lua
diff options
context:
space:
mode:
Diffstat (limited to 'drive_entity.lua')
-rw-r--r--drive_entity.lua5
1 files changed, 2 insertions, 3 deletions
diff --git a/drive_entity.lua b/drive_entity.lua
index deee866..de7c43f 100644
--- a/drive_entity.lua
+++ b/drive_entity.lua
@@ -441,9 +441,8 @@ function celevator.drives.entity.entitiestonodes(refs,carid)
minetest.after(0.5,function()
if not i:is_player() then return end
local newpos = i:get_pos()
- if newpos.y < (ppos.y-0.1) then
- i:set_pos(ppos)
- end
+ newpos.y = math.max(newpos.y,ppos.y)
+ i:set_pos(newpos)
end)
elseif i:get_luaentity() and rounded[i:get_luaentity().name] then
local epos = i:get_pos()