summaryrefslogtreecommitdiff
path: root/railcart/railcart.lua
diff options
context:
space:
mode:
authorstujones11 <stujones111@gmail.com>2016-01-15 20:17:25 +0000
committerstujones11 <stujones111@gmail.com>2016-01-15 20:17:25 +0000
commit25aa9b3e6e0f37486583286eba3ee48ff7185db6 (patch)
treeff1be1a344fe94ebb751718b99a9c52486757586 /railcart/railcart.lua
parent36ba9f3f369bef255335a9125a865e6df0b5aadb (diff)
Make carts run a little smoother
Diffstat (limited to 'railcart/railcart.lua')
-rw-r--r--railcart/railcart.lua3
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