From e42945a4e14d9d76463ba0e35b329ad89534da99 Mon Sep 17 00:00:00 2001 From: Wuzzy Date: Wed, 30 Jan 2019 02:41:24 +0100 Subject: [PATCH] Minecarts: Reset eye offset when detaching player --- mods/ENTITIES/mcl_minecarts/init.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mods/ENTITIES/mcl_minecarts/init.lua b/mods/ENTITIES/mcl_minecarts/init.lua index 25e2183f79..2d48a28c6d 100644 --- a/mods/ENTITIES/mcl_minecarts/init.lua +++ b/mods/ENTITIES/mcl_minecarts/init.lua @@ -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()