Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
I
illuna-minetest
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
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
illuna-minetest
Commits
29e46d6b
Commit
29e46d6b
authored
10 years ago
by
paramat
Browse files
Options
Downloads
Patches
Plain Diff
Mgv6: Fix uninitialised heightmap used by cavegen
parent
b2b6bbf3
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/mapgen_v6.cpp
+4
-2
4 additions, 2 deletions
src/mapgen_v6.cpp
with
4 additions
and
2 deletions
src/mapgen_v6.cpp
+
4
−
2
View file @
29e46d6b
...
...
@@ -56,7 +56,6 @@ MapgenV6::MapgenV6(int mapgenid, MapgenParams *params, EmergeManager *emerge)
this
->
ystride
=
csize
.
X
;
//////fix this
this
->
heightmap
=
new
s16
[
csize
.
X
*
csize
.
Z
];
memset
(
this
->
heightmap
,
0
,
csize
.
X
*
csize
.
Z
*
sizeof
(
*
this
->
heightmap
));
MapgenV6Params
*
sp
=
(
MapgenV6Params
*
)
params
->
sparams
;
this
->
spflags
=
sp
->
spflags
;
...
...
@@ -480,6 +479,9 @@ void MapgenV6::makeChunk(BlockMakeData *data)
generateExperimental
();
// Create initial heightmap to limit caves
updateHeightmap
(
node_min
,
node_max
);
const
s16
max_spread_amount
=
MAP_BLOCKSIZE
;
// Limit dirt flow area by 1 because mud is flown into neighbors.
s16
mudflow_minpos
=
-
max_spread_amount
+
1
;
...
...
@@ -504,7 +506,7 @@ void MapgenV6::makeChunk(BlockMakeData *data)
}
//
Cre
ate heightmap after mudflow
//
Upd
ate heightmap after mudflow
updateHeightmap
(
node_min
,
node_max
);
// Add dungeons
...
...
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