Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
L
loud_walking
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Illuna-Minetest
loud_walking
Commits
3affe23a
Commit
3affe23a
authored
8 years ago
by
Duane Robertson
Browse files
Options
Downloads
Patches
Plain Diff
Fix room type randomization.
parent
1e90a52e
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
mapgen.lua
+3
-3
3 additions, 3 deletions
mapgen.lua
with
3 additions
and
3 deletions
mapgen.lua
+
3
−
3
View file @
3affe23a
...
...
@@ -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
()
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment