Fix endless recursion in calc_rail_dir() (fixes #14)

master
PilzAdam 2014-05-07 21:22:20 +02:00
parent 70cc4f449f
commit 10c455793d
1 changed files with 1 additions and 1 deletions

View File

@ -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