improved passengers rescue

This commit is contained in:
Alexsandro Percy 2024-03-15 21:07:27 -03:00
parent 315de219b1
commit 6d8a99e7a8

View file

@ -642,7 +642,8 @@ function airutils.checkattachBug(self)
end]]--
local max_seats = table.getn(self._passengers_base)
for i = max_seats,1,-1 do
if max_seats > 2 then
for i = max_seats,3,-1 do
if self._passengers[i] then
local player = minetest.get_player_by_name(self._passengers[i])
if not player:get_attach() then
@ -650,6 +651,7 @@ function airutils.checkattachBug(self)
end
end
end
end
-- for some engine error the player can be detached from the submarine, so lets set him attached again
local have_driver = (self.driver_name ~= nil)