aboutsummaryrefslogtreecommitdiff
path: root/advtrains/advtrains/helpers.lua
diff options
context:
space:
mode:
Diffstat (limited to 'advtrains/advtrains/helpers.lua')
-rw-r--r--advtrains/advtrains/helpers.lua14
1 files changed, 7 insertions, 7 deletions
diff --git a/advtrains/advtrains/helpers.lua b/advtrains/advtrains/helpers.lua
index cc7deb8..5761d18 100644
--- a/advtrains/advtrains/helpers.lua
+++ b/advtrains/advtrains/helpers.lua
@@ -94,7 +94,7 @@ function advtrains.conway(midreal, prev, drives_on)--in order prev,mid,return
--atprint("dir applied next pos: "..(next and minetest.pos_to_string(next) or "nil").."(chkdir is "..(chkdir or "nil")..", y-offset "..y_offset..")")
--is there a next
if not next then
- atprint("in conway: no next rail(nil), returning!")
+ --atprint("in conway: no next rail(nil), returning!")
return nil
end
@@ -102,31 +102,31 @@ function advtrains.conway(midreal, prev, drives_on)--in order prev,mid,return
--is it a rail?
if(not nextnode_ok) then
- atprint("in conway: next "..minetest.pos_to_string(next).." not a rail, trying one node below!")
+ --atprint("in conway: next "..minetest.pos_to_string(next).." not a rail, trying one node below!")
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(next), drives_on)
if(not nextnode_ok) then
- atprint("in conway: one below "..minetest.pos_to_string(next).." is not a rail either, returning!")
+ --atprint("in conway: one below "..minetest.pos_to_string(next).." is not a rail either, returning!")
return nil
end
end
--is this next rail connecting to the mid?
if not ( (((nextdir1+8)%16)==chkdir and nextrely1==chkrely-y_offset) or (((nextdir2+8)%16)==chkdir and nextrely2==chkrely-y_offset) ) then
- atprint("in conway: next "..minetest.pos_to_string(next).." not connecting, trying one node below!")
+ --atprint("in conway: next "..minetest.pos_to_string(next).." not connecting, trying one node below!")
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(next), drives_on)
if(not nextnode_ok) then
- atprint("in conway: (at connecting if check again) one below "..minetest.pos_to_string(next).." is not a rail either, returning!")
+ --atprint("in conway: (at connecting if check again) one below "..minetest.pos_to_string(next).." is not a rail either, returning!")
return nil
end
if not ( (((nextdir1+8)%16)==chkdir and nextrely1==chkrely) or (((nextdir2+8)%16)==chkdir and nextrely2==chkrely) ) then
- atprint("in conway: one below "..minetest.pos_to_string(next).." rail not connecting, returning!")
- atprint(" in order mid1,2,next1,2,chkdir "..middir1.." "..middir2.." "..nextdir1.." "..nextdir2.." "..chkdir)
+ --atprint("in conway: one below "..minetest.pos_to_string(next).." rail not connecting, returning!")
+ --atprint(" in order mid1,2,next1,2,chkdir "..middir1.." "..middir2.." "..nextdir1.." "..nextdir2.." "..chkdir)
return nil
end
end