Disable chaining of two vertical corridors
parent
681dc026b5
commit
6431a7b906
8
init.lua
8
init.lua
|
@ -402,12 +402,12 @@ local function start_corridor(waypoint, coord, sign, length, psra, wood, post)
|
||||||
local wp = waypoint
|
local wp = waypoint
|
||||||
local c = coord
|
local c = coord
|
||||||
local s = sign
|
local s = sign
|
||||||
local ud
|
local ud = false -- up or down
|
||||||
local up
|
local up
|
||||||
for i=1,length do
|
for i=1,length do
|
||||||
-- Nach oben oder nach unten?
|
-- Up or down?
|
||||||
--Up or down?
|
-- ud is also checked to prevent chaining up/down segments
|
||||||
if pr:next() < probability_up_or_down and i~=1 then
|
if pr:next() < probability_up_or_down and i~=1 and not ud then
|
||||||
ud = true
|
ud = true
|
||||||
-- Force direction near the height limits
|
-- Force direction near the height limits
|
||||||
if wp.y >= height_max - 12 then
|
if wp.y >= height_max - 12 then
|
||||||
|
|
Loading…
Reference in New Issue