diff --git a/init.lua b/init.lua index 2fd99a6..40fc4e3 100644 --- a/init.lua +++ b/init.lua @@ -88,7 +88,7 @@ if setting ~= nil then end -- Max. and min. heights between rail corridors are generated -local height_min = -31000 +local height_min = -30900 local height_max = -30 setting = tonumber(minetest.settings:get("tsm_railcorridors_height_min")) if setting then @@ -827,7 +827,7 @@ local function start_corridor(waypoint, coord, sign, length, wood, post, damage, up = true else -- Chose random direction in between - up = pr:next(0, 2) < 1 + up = pr:next(1, 2) == 1 end else ud = false diff --git a/settingtypes.txt b/settingtypes.txt index 8cd03b0..5f03003 100644 --- a/settingtypes.txt +++ b/settingtypes.txt @@ -35,10 +35,10 @@ tsm_railcorridors_place_cobwebs (Cobwebs) bool true tsm_railcorridors_probability_damage (Damaged railway probability) float 0.55 0.0 1.0 #Minimum height in which rail corridors are created. -tsm_railcorridors_height_min (Minimum height) int -31000 -31000 31000 +tsm_railcorridors_height_min (Minimum height) int -30900 #Maximum height in which rail corridors are created. -tsm_railcorridors_height_max (Maximum height) int -30 -31000 31000 +tsm_railcorridors_height_max (Maximum height) int -30 #If enabled, rail corridors continue to generate through obstacles such #as other rail corridors (without destroying them, mostly). This may lead