From 57d09fac798984ab940018be170bdbcdfaba43a6 Mon Sep 17 00:00:00 2001 From: SmallJoker Date: Tue, 28 Nov 2017 18:32:29 +0100 Subject: [PATCH] =?UTF-8?q?Revert=20velocity=20calculation=20change=20from?= =?UTF-8?q?=20e3688b5=20Accelerates=20carts=20too=20much=20when=20going=20?= =?UTF-8?q?up/downhill=20Caused=20by=20wrong=20vector=20length=20calculati?= =?UTF-8?q?on.=20This=20will=20need=20to=20be=20altered=20again=20if=20the?= =?UTF-8?q?re=20will=20be=2045=C2=B0=20rails?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- cart_entity.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cart_entity.lua b/cart_entity.lua index ca940c4..02436fb 100644 --- a/cart_entity.lua +++ b/cart_entity.lua @@ -232,7 +232,7 @@ function cart_entity:on_step(dtime) else -- Direction change detected if dir_changed then - vel = vector.multiply(dir, v3_len(vel)) + vel = vector.multiply(dir, math.abs(vel.x + vel.z)) update.vel = true if dir.y ~= self.old_dir.y then pos = vector.round(pos)