aboutsummaryrefslogtreecommitdiff
path: root/helpers.lua
diff options
context:
space:
mode:
authororwell96 <mono96.mml@gmail.com>2016-05-30 19:58:09 +0200
committerorwell96 <mono96.mml@gmail.com>2016-05-30 19:58:09 +0200
commitd81509c049f8c0a46e9002af7ce4666f4284111b (patch)
treed6fe972604ab07c68420149e082c3a5dc978775f /helpers.lua
parentc71b0209270daa2df717c449c67507d9db0dc0a9 (diff)
downloadadvtrains-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.lua6
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