mirror of
https://github.com/SmallJoker/boost_cart.git
synced 2024-11-23 23:23:44 +01:00
Fix crash caused by stop rail and 8b4487c (#15)
This commit is contained in:
parent
8b4487c2b8
commit
acf697cd43
@ -264,8 +264,12 @@ function cart_entity:on_step(dtime)
|
||||
end
|
||||
end
|
||||
|
||||
if acc then
|
||||
-- Slow down or speed up, depending on Y direction
|
||||
acc = acc + dir.y * -2
|
||||
else
|
||||
acc = 0
|
||||
end
|
||||
|
||||
if self.old_dir.y ~= 1 and not self.punched then
|
||||
-- Stop the cart swing between two rail parts (handbrake)
|
||||
|
Loading…
Reference in New Issue
Block a user