Skip to content

Commit

Permalink
Change fix to mathematical approach.
Browse files Browse the repository at this point in the history
  • Loading branch information
stijnwop committed Jun 22, 2020
1 parent 1e5639a commit 93b607a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/vehicle/ProSeedTramLines.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 93b607a

Please sign in to comment.