From 6559bc23f91d4178cb2a6e027d4391088b97cf01 Mon Sep 17 00:00:00 2001 From: teknomunk Date: Sat, 28 Dec 2024 18:34:27 -0600 Subject: [PATCH] Fix orientation of carts on slopes --- mods/ENTITIES/mcl_minecarts/functions.lua | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/mods/ENTITIES/mcl_minecarts/functions.lua b/mods/ENTITIES/mcl_minecarts/functions.lua index d5304448b..1305a87a1 100644 --- a/mods/ENTITIES/mcl_minecarts/functions.lua +++ b/mods/ENTITIES/mcl_minecarts/functions.lua @@ -469,9 +469,9 @@ function mod.update_cart_orientation(self) -- Forward/backwards tilt (pitch) if dir.y > 0 then - rot.x = -_quart_pi - elseif dir.y < 0 then rot.x = _quart_pi + elseif dir.y < 0 then + rot.x = -_quart_pi else rot.x = 0 end @@ -479,9 +479,6 @@ function mod.update_cart_orientation(self) if ( staticdata.rot_adjust or 0 ) < 0.01 then rot.x = -rot.x end - if dir.z ~= 0 then - rot.x = -rot.x - end rot.y = (rot.y + _half_pi) % _2_pi self.object:set_rotation(rot)