mirror of
https://git.minetest.land/VoxeLibre/VoxeLibre.git
synced 2024-12-27 02:19:33 +01:00
Place player in front of choat, disallow passenger
This commit is contained in:
parent
0ec4cb5502
commit
e245ff02c2
1 changed files with 10 additions and 2 deletions
|
@ -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,7 +81,11 @@ local function attach_object(self, obj)
|
|||
set_double_attach(self)
|
||||
else
|
||||
self._driver = obj
|
||||
set_attach(self)
|
||||
if self._inv_id then
|
||||
set_choat_attach(self)
|
||||
else
|
||||
set_attach(self)
|
||||
end
|
||||
end
|
||||
|
||||
local visual_size = get_visual_size(obj)
|
||||
|
|
Loading…
Reference in a new issue