diff options
Diffstat (limited to 'railcart/railcart.lua')
-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 |