More up/down tweaks

master
Wuzzy 2019-02-14 00:07:18 +01:00
parent 753df904db
commit 431a04625a
1 changed files with 7 additions and 1 deletions

View File

@ -823,12 +823,18 @@ local function start_corridor(waypoint, coord, sign, length, wood, post, damage,
ud = true
-- Force direction near the height limits
if wp.y >= height_max - 12 then
if udp then
ud = false
end
up = false
elseif wp.y <= height_min + 12 then
if udp then
ud = false
end
up = true
else
-- If previous was up/down, keep the vertical direction
if udp then
if udp and not chaos_mode then
up = upp
else
-- Chose random direction