From 93b607a2578cf4f9695877086f1b587ceef64062 Mon Sep 17 00:00:00 2001 From: Stijn Wopereis Date: Mon, 22 Jun 2020 20:22:54 +0200 Subject: [PATCH] Change fix to mathematical approach. --- src/vehicle/ProSeedTramLines.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/vehicle/ProSeedTramLines.lua b/src/vehicle/ProSeedTramLines.lua index 65130de..65233c5 100644 --- a/src/vehicle/ProSeedTramLines.lua +++ b/src/vehicle/ProSeedTramLines.lua @@ -281,7 +281,7 @@ function ProSeedTramLines:onUpdateTick(dt) end if spec.tramLineMode ~= ProSeedTramLines.TRAMLINE_MODE_MANUAL then - local rest = lanesForDistance % 2 ~= 0 and 0 or 1 + local rest = 1 - lanesForDistance % 2 local laneForTramLine = math.floor((lanesForDistance / 2) + 0.5) + rest --We create lines when we can divide. spec.createTramLines = spec.currentLane == laneForTramLine