From 7db41146ffece4dc7f2166eae61a50c62937622a Mon Sep 17 00:00:00 2001 From: teknomunk Date: Wed, 13 Mar 2024 12:26:15 +0000 Subject: [PATCH] Prevent players from entering minecarts when sneaking, prevents players from causing https://git.minetest.land/MineClone2/MineClone2/issues/3188 --- mods/ENTITIES/mcl_minecarts/init.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mods/ENTITIES/mcl_minecarts/init.lua b/mods/ENTITIES/mcl_minecarts/init.lua index 569c2614c..0be63ccdd 100644 --- a/mods/ENTITIES/mcl_minecarts/init.lua +++ b/mods/ENTITIES/mcl_minecarts/init.lua @@ -1022,7 +1022,7 @@ register_minecart({ local player_name = clicker:get_player_name() if self._driver and player_name == self._driver then --detach_driver(self) - elseif not self._driver then + elseif not self._driver and not clicker:get_player_control().sneak then self._driver = player_name self._start_pos = self.object:get_pos() mcl_player.player_attached[player_name] = true