From 3d29635a8ff605459dfbf9a95e988bd0e31cc94d Mon Sep 17 00:00:00 2001 From: orwell96 Date: Fri, 24 Nov 2017 12:06:46 +0100 Subject: Correct yaw to preferred rail direction calculation --- advtrains/trackplacer.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/advtrains/trackplacer.lua b/advtrains/trackplacer.lua index 8c943c8..f200638 100644 --- a/advtrains/trackplacer.lua +++ b/advtrains/trackplacer.lua @@ -178,7 +178,7 @@ function tp.placetrack(pos, nnpref, placer, itemstack, pointed_thing, yaw) for ix, p_rail in ipairs(p_rails) do local sconn1 = tr.single_conn_1 local sconn2 = tr.single_conn_2 - if not (advtrains.yawToDirection(yaw, p_rail, (p_rail+8)%16) == p_rail) then + if not (advtrains.yawToDirection((math.pi/2) - yaw, p_rail, (p_rail+8)%16) == p_rail) then sconn1 = tr.single_conn_2 sconn2 = tr.single_conn_1 end -- cgit v1.2.3