From be0c56edef91229043f6599a658e9536ce9639cf Mon Sep 17 00:00:00 2001 From: SmallJoker Date: Sat, 14 Oct 2017 11:28:05 +0200 Subject: [PATCH] Pathfinder: Fix bounce back effect at rail end --- functions.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/functions.lua b/functions.lua index 86de036..9f5b7e9 100644 --- a/functions.lua +++ b/functions.lua @@ -177,7 +177,7 @@ function boost_cart:pathfinder(pos_, old_pos, old_dir, distance, ctrl, for i = 1, distance do pf_dir, pf_switch = self:get_rail_direction( - pf_pos, pf_dir, ctrl, pf_switch, railtype) + pf_pos, pf_dir, ctrl, pf_switch or 0, railtype) if vector.equals(pf_dir, {x=0, y=0, z=0}) then -- No way forwards