diff options
author | stujones11 <stujones111@gmail.com> | 2016-01-15 20:17:25 +0000 |
---|---|---|
committer | stujones11 <stujones111@gmail.com> | 2016-01-15 20:17:25 +0000 |
commit | 25aa9b3e6e0f37486583286eba3ee48ff7185db6 (patch) | |
tree | ff1be1a344fe94ebb751718b99a9c52486757586 | |
parent | 36ba9f3f369bef255335a9125a865e6df0b5aadb (diff) |
Make carts run a little smoother
-rw-r--r-- | railcart/railcart.lua | 3 |
1 files changed, 2 insertions, 1 deletions
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 |