1
0
Fork 0

Minecarts: Reset eye offset when detaching player

This commit is contained in:
Wuzzy 2019-01-30 02:41:24 +01:00
parent 5a1cafa5dd
commit e42945a4e1
1 changed files with 2 additions and 2 deletions

View File

@ -65,6 +65,7 @@ local function register_entity(entity_id, mesh, textures, drop, on_rightclick)
local player = minetest.get_player_by_name(self._driver)
if player then
player:set_detach()
player:set_eye_offset({x=0, y=0, z=0},{x=0, y=0, z=0})
end
end
@ -434,8 +435,7 @@ register_minecart(
self._driver = nil
self._start_pos = nil
clicker:set_detach()
local player = minetest.get_player_by_name(name)
player:set_eye_offset({x=0, y=0, z=0},{x=0, y=0, z=0})
clicker:set_eye_offset({x=0, y=0, z=0},{x=0, y=0, z=0})
elseif not self._driver then
self._driver = player_name
self._start_pos = self.object:getpos()