diff options
| author | cheapie <no-email-for-you@example.com> | 2025-03-22 21:04:55 -0500 |
|---|---|---|
| committer | cheapie <no-email-for-you@example.com> | 2025-03-22 21:04:55 -0500 |
| commit | 690374449d39aefe995c380b951aecdd18374ef3 (patch) | |
| tree | fa65df58165e7de0dfe01bfc9b817102df5e2f07 | |
| parent | f8e26f45845e6874320b50431e8df0056e94c326 (diff) | |
| download | celevator-690374449d39aefe995c380b951aecdd18374ef3.tar celevator-690374449d39aefe995c380b951aecdd18374ef3.tar.gz celevator-690374449d39aefe995c380b951aecdd18374ef3.tar.bz2 celevator-690374449d39aefe995c380b951aecdd18374ef3.tar.xz celevator-690374449d39aefe995c380b951aecdd18374ef3.zip | |
Improve fall-through protection
| -rw-r--r-- | drive_entity.lua | 5 |
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() |
