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, "",
|
boat._passenger:set_attach(boat.object, "",
|
||||||
{x = 0, y = 0.42, z = -2.2}, {x = 0, y = 0, z = 0})
|
{x = 0, y = 0.42, z = -2.2}, {x = 0, y = 0, z = 0})
|
||||||
end
|
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)
|
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
|
if self._driver:is_player() then
|
||||||
self._passenger = obj
|
self._passenger = obj
|
||||||
else
|
else
|
||||||
|
@ -77,7 +81,11 @@ local function attach_object(self, obj)
|
||||||
set_double_attach(self)
|
set_double_attach(self)
|
||||||
else
|
else
|
||||||
self._driver = obj
|
self._driver = obj
|
||||||
set_attach(self)
|
if self._inv_id then
|
||||||
|
set_choat_attach(self)
|
||||||
|
else
|
||||||
|
set_attach(self)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
local visual_size = get_visual_size(obj)
|
local visual_size = get_visual_size(obj)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user