mirror of
https://github.com/APercy/airutils.git
synced 2025-03-15 08:01:22 +00:00
improved copilot attachment
This commit is contained in:
parent
a252503f37
commit
be2f9cccc2
2 changed files with 2 additions and 3 deletions
|
@ -38,7 +38,7 @@ function airutils.on_activate(self, staticdata, dtime_s)
|
|||
self.owner = data.stored_owner
|
||||
self.hp_max = data.stored_hp
|
||||
self._color = data.stored_color
|
||||
self._color_2 = data.stored_color_2
|
||||
self._color_2 = data.stored_color_2 or data.stored_color --if it has no color 2, now it have!
|
||||
self._power_lever = data.stored_power_lever
|
||||
self.driver_name = data.stored_driver_name
|
||||
self._last_accell = data.stored_last_accell
|
||||
|
@ -703,7 +703,6 @@ function airutils.on_rightclick(self, clicker)
|
|||
--=========================
|
||||
local is_attached = false
|
||||
local seat = clicker:get_attach()
|
||||
--TODO crar funcao legacy aqui
|
||||
if seat then
|
||||
local plane = seat:get_attach()
|
||||
if plane == self.object then is_attached = true end
|
||||
|
|
|
@ -140,7 +140,7 @@ function airutils.attach_pax(self, player, is_copilot)
|
|||
--randomize the seat
|
||||
local max_seats = table.getn(self._seats)
|
||||
local crew = 1
|
||||
if self._have_copilot then crew = crew + 1 end
|
||||
if self._have_copilot and max_seats > 2 then crew = crew + 1 end
|
||||
t = {} -- new array
|
||||
for i=1, max_seats - crew do --(the first are for the crew
|
||||
t[i] = i
|
||||
|
|
Loading…
Add table
Reference in a new issue