diff options
author | orwell96 <orwell@bleipb.de> | 2017-11-24 12:06:46 +0100 |
---|---|---|
committer | orwell96 <orwell@bleipb.de> | 2017-11-24 12:06:46 +0100 |
commit | 3d29635a8ff605459dfbf9a95e988bd0e31cc94d (patch) | |
tree | 01b206d75320f011e524cdde67dd1de8ebc2a3f5 /advtrains | |
parent | d78d07589d31db62167eafafb36b9e8c0468c6d1 (diff) | |
download | advtrains-3d29635a8ff605459dfbf9a95e988bd0e31cc94d.tar.gz advtrains-3d29635a8ff605459dfbf9a95e988bd0e31cc94d.tar.bz2 advtrains-3d29635a8ff605459dfbf9a95e988bd0e31cc94d.zip |
Correct yaw to preferred rail direction calculation
Diffstat (limited to 'advtrains')
-rw-r--r-- | advtrains/trackplacer.lua | 2 |
1 files changed, 1 insertions, 1 deletions
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 |