From cea82c07f8b17ac5cdde32e55a238df5d3f182c6 Mon Sep 17 00:00:00 2001 From: teknomunk Date: Sat, 9 Nov 2024 09:21:23 -0600 Subject: [PATCH] Remove debug code --- mods/ENTITIES/mcl_minecarts/functions.lua | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/mods/ENTITIES/mcl_minecarts/functions.lua b/mods/ENTITIES/mcl_minecarts/functions.lua index 428b56b11..97933f2ef 100644 --- a/mods/ENTITIES/mcl_minecarts/functions.lua +++ b/mods/ENTITIES/mcl_minecarts/functions.lua @@ -461,13 +461,9 @@ function mod.update_cart_orientation(self) if not rot then return end local diff = math.abs((rot_y - ( rot.y + pi ) % _2_pi) ) - local flipped = false if diff < 0.001 or diff > _2_pi - 0.001 then - -- Update rotation adjust and recalculate the rotation + -- Update rotation adjust staticdata.rot_adjust = ( ( staticdata.rot_adjust or 0 ) + pi ) % _2_pi - local new_rot_y = math.atan2( dir.z, dir.x ) + ( staticdata.rot_adjust or 0 ) - assert((math.abs(rot.y -new_rot_y) % _2_pi) < 0.001, "math is wrong: "..tostring(new_rot_y).." ~= "..tostring(rot.y)) - flipped = true else rot.y = rot_y end