From 25aa9b3e6e0f37486583286eba3ee48ff7185db6 Mon Sep 17 00:00:00 2001 From: stujones11 Date: Fri, 15 Jan 2016 20:17:25 +0000 Subject: Make carts run a little smoother --- railcart/railcart.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'railcart') diff --git a/railcart/railcart.lua b/railcart/railcart.lua index 917da44..df6d635 100644 --- a/railcart/railcart.lua +++ b/railcart/railcart.lua @@ -199,7 +199,8 @@ function railcart:update(cart, time, object) accel = RAILTRACK_ACCEL_UP end accel = cart.accel or accel - local dt = railcart:get_delta_time(speed, accel, dist) + local d = dist - RAILCART_SNAP_DISTANCE + local dt = railcart:get_delta_time(speed, accel, d) if dt < time then time = dt end -- cgit v1.2.3