From 690374449d39aefe995c380b951aecdd18374ef3 Mon Sep 17 00:00:00 2001
From: cheapie <no-email-for-you@example.com>
Date: Sat, 22 Mar 2025 21:04:55 -0500
Subject: Improve fall-through protection

---
 drive_entity.lua | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

(limited to 'drive_entity.lua')

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()
-- 
cgit v1.2.3