Skip to content

Commit

Permalink
Fix endless recursion in calc_rail_dir() (fixes #14)
Browse files Browse the repository at this point in the history
  • Loading branch information
PilzAdam committed May 7, 2014
1 parent 70cc4f4 commit 10c4557
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ function cart:calc_rail_direction(pos, vel)
z = v * dir.z,
}

if cart_func.v3:equal(velocity, {x=0, y=0, z=0}) then
if cart_func.v3:equal(velocity, {x=0, y=0, z=0}) and not cart_func:is_rail(p) then

-- First try this HACK
-- Move the cart on the rail if above or under it
Expand Down

0 comments on commit 10c4557

Please sign in to comment.