Place player in front of choat, disallow passenger
This commit is contained in:
parent
0ec4cb5502
commit
e245ff02c2
|
@ -65,9 +65,13 @@ local function set_double_attach(boat)
|
|||
boat._passenger:set_attach(boat.object, "",
|
||||
{x = 0, y = 0.42, z = -2.2}, {x = 0, y = 0, z = 0})
|
||||
end
|
||||
local function set_choat_attach(boat)
|
||||
boat._driver:set_attach(boat.object, "",
|
||||
{x = 0, y = 0.42, z = 1.8}, {x = 0, y = 0, z = 0})
|
||||
end
|
||||
|
||||
local function attach_object(self, obj)
|
||||
if self._driver then
|
||||
if self._driver and not self._inv_id then
|
||||
if self._driver:is_player() then
|
||||
self._passenger = obj
|
||||
else
|
||||
|
@ -77,8 +81,12 @@ local function attach_object(self, obj)
|
|||
set_double_attach(self)
|
||||
else
|
||||
self._driver = obj
|
||||
if self._inv_id then
|
||||
set_choat_attach(self)
|
||||
else
|
||||
set_attach(self)
|
||||
end
|
||||
end
|
||||
|
||||
local visual_size = get_visual_size(obj)
|
||||
local yaw = self.object:get_yaw()
|
||||
|
|
Loading…
Reference in New Issue