Merge pull request #37 from cyberplant/patch-1

Fixed issue on mineclonia related to player_api not found
This commit is contained in:
Alexsandro Percy 2025-05-13 03:00:00 -03:00 committed by GitHub
commit c2aa272daf
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -78,7 +78,9 @@ function automobiles_lib.on_rightclick (self, clicker)
else
--minetest.chat_send_all("clicou")
--a passenger
if not player_api.player_attached[name] then
if (automobiles_lib.is_minetest and not player_api.player_attached[name]) or
(airutils.is_mcl and mcl_player.player_attached[name]) then
--there is no passenger, so lets attach
if self.driver_name then
local attach_pax_f = automobiles_lib.attach_pax