mirror of
https://github.com/APercy/airutils.git
synced 2025-03-21 10:31:22 +00:00
fixing error on autofly
This commit is contained in:
parent
b98020f434
commit
97abe243d3
1 changed files with 4 additions and 3 deletions
|
@ -862,7 +862,7 @@ function airutils.on_rightclick(self, clicker)
|
||||||
--=========================
|
--=========================
|
||||||
-- attach pilot
|
-- attach pilot
|
||||||
--=========================
|
--=========================
|
||||||
elseif not self.driver_name then
|
elseif not self.driver_name and self._autoflymode == false then
|
||||||
if self.owner == name or minetest.check_player_privs(clicker, {protection_bypass=true}) then
|
if self.owner == name or minetest.check_player_privs(clicker, {protection_bypass=true}) then
|
||||||
|
|
||||||
local itmstck=clicker:get_wielded_item()
|
local itmstck=clicker:get_wielded_item()
|
||||||
|
@ -924,9 +924,10 @@ function airutils.on_rightclick(self, clicker)
|
||||||
--=========================
|
--=========================
|
||||||
-- attach passenger
|
-- attach passenger
|
||||||
--=========================
|
--=========================
|
||||||
--TODO - _autoflymode
|
|
||||||
elseif self.driver_name ~= nil or self._autoflymode == true then
|
elseif self.driver_name ~= nil or self._autoflymode == true then
|
||||||
local player = minetest.get_player_by_name(self.driver_name)
|
local d_name = self.driver_name
|
||||||
|
if d_name == nil then d_name = "" end
|
||||||
|
local player = minetest.get_player_by_name(d_name)
|
||||||
if player or self._autoflymode == true then
|
if player or self._autoflymode == true then
|
||||||
is_attached = airutils.check_passenger_is_attached(self, name)
|
is_attached = airutils.check_passenger_is_attached(self, name)
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue