Skip to content
Snippets Groups Projects
Commit 3affe23a authored by Duane Robertson's avatar Duane Robertson
Browse files

Fix room type randomization.

parent 1e90a52e
No related branches found
No related tags found
No related merge requests found
......@@ -327,8 +327,8 @@ local function generate(p_minp, p_maxp, seed)
local room_px = math_floor((math_abs(fdx - half_pod.x) - 3) / room_size)
local room_py = math_floor(fdy / 5)
local room_pz = math_floor((math_abs(fdz - half_pod.z) - 3) / room_size)
room_type = math_floor((math_abs(room_pz * room_py * room_px * px * py * pz) % 17) / 3)
room_type_below = math_floor((math_abs(room_pz * (room_py - 1) * room_px * px * py * pz) % 17) / 3)
room_type = math_floor((math_abs(room_pz * 1000000 + room_py * 1000 + room_px) % 17) / 3)
room_type_below = math_floor((math_abs(room_pz * 1000000 + (room_py - 1) * 1000 + room_px) % 17) / 3)
if room_type_below == 1 and room_type == 3 then
room_type = 0
end
......@@ -585,7 +585,7 @@ local function generate(p_minp, p_maxp, seed)
local t4 = os.clock()
vm:set_data(data)
minetest.generate_ores(vm, minp, maxp)
--minetest.generate_ores(vm, minp, maxp)
--vm:set_param2_data(p2data)
vm:set_lighting({day = 0, night = 0}, minp, maxp)
vm:update_liquids()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment