From d81509c049f8c0a46e9002af7ce4666f4284111b Mon Sep 17 00:00:00 2001 From: orwell96 Date: Mon, 30 May 2016 19:58:09 +0200 Subject: fixed even more lua errors and made stable --- helpers.lua | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'helpers.lua') diff --git a/helpers.lua b/helpers.lua index 515784b..2c87e1e 100644 --- a/helpers.lua +++ b/helpers.lua @@ -107,7 +107,7 @@ function advtrains.conway(midreal, prev, traintype)--in order prev,mid,return return nil end - local nextnode_ok, nextdir1, nextdir2, nextrely1, nextrely2, nextrailheight=advtrains.get_rail_info_at(advtrains.round_vector_floor_y(mid), traintype) + local nextnode_ok, nextdir1, nextdir2, nextrely1, nextrely2, nextrailheight=advtrains.get_rail_info_at(advtrains.round_vector_floor_y(next), traintype) --is it a rail? if(not nextnode_ok) then @@ -115,7 +115,7 @@ function advtrains.conway(midreal, prev, traintype)--in order prev,mid,return next.y=next.y-1 y_offset=y_offset-1 - nextnode_ok, nextdir1, nextdir2, nextrely1, nextrely2, nextrailheight=advtrains.get_rail_info_at(advtrains.round_vector_floor_y(mid), traintype) + nextnode_ok, nextdir1, nextdir2, nextrely1, nextrely2, nextrailheight=advtrains.get_rail_info_at(advtrains.round_vector_floor_y(next), traintype) if(not nextnode_ok) then print("[advtrains]in conway: one below "..minetest.pos_to_string(next).." is not a rail either, returning!") return nil @@ -128,7 +128,7 @@ function advtrains.conway(midreal, prev, traintype)--in order prev,mid,return next.y=next.y-1 y_offset=y_offset-1 - nextnode_ok, nextdir1, nextdir2, nextrely1, nextrely2, nextrailheight=advtrains.get_rail_info_at(advtrains.round_vector_floor_y(mid), traintype) + nextnode_ok, nextdir1, nextdir2, nextrely1, nextrely2, nextrailheight=advtrains.get_rail_info_at(advtrains.round_vector_floor_y(next), traintype) if(not nextnode_ok) then print("[advtrains]in conway: (at connecting if check again) one below "..minetest.pos_to_string(next).." is not a rail either, returning!") return nil -- cgit v1.2.3