From 7e275e198565cdef248a82b5ec7640a9580532ff Mon Sep 17 00:00:00 2001 From: SmallJoker Date: Wed, 4 Jul 2018 21:23:06 +0200 Subject: [PATCH] Disallow rail switching up/downhill --- functions.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/functions.lua b/functions.lua index dca494e..cf5fafd 100644 --- a/functions.lua +++ b/functions.lua @@ -107,7 +107,7 @@ function boost_cart:get_rail_direction(pos_, dir, ctrl, old_switch, railtype) right.z = -dir.x end - if ctrl then + if ctrl and dir.y == 0 then if old_switch == 1 then left_check = false elseif old_switch == 2 then