diff options
author | orwell96 <mono96.mml@gmail.com> | 2016-05-30 19:58:09 +0200 |
---|---|---|
committer | orwell96 <mono96.mml@gmail.com> | 2016-05-30 19:58:09 +0200 |
commit | d81509c049f8c0a46e9002af7ce4666f4284111b (patch) | |
tree | d6fe972604ab07c68420149e082c3a5dc978775f /helpers.lua | |
parent | c71b0209270daa2df717c449c67507d9db0dc0a9 (diff) | |
download | advtrains-d81509c049f8c0a46e9002af7ce4666f4284111b.tar.gz advtrains-d81509c049f8c0a46e9002af7ce4666f4284111b.tar.bz2 advtrains-d81509c049f8c0a46e9002af7ce4666f4284111b.zip |
fixed even more lua errors and made stable
Diffstat (limited to 'helpers.lua')
-rw-r--r-- | helpers.lua | 6 |
1 files changed, 3 insertions, 3 deletions
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
|