Disable chaining of two vertical corridors

master
Wuzzy 2017-05-10 15:58:59 +02:00
parent 681dc026b5
commit 6431a7b906
1 changed files with 5 additions and 5 deletions

View File

@ -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?
if pr:next() < probability_up_or_down and i~=1 then -- ud is also checked to prevent chaining up/down segments
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