Skip to content

Commit

Permalink
Mgv7: Fix undefined 'float_mount_height'
Browse files Browse the repository at this point in the history
Commit cad10ce altered the parameter
'float_mount_height' but was missing the necessary line in the constructor
to get the altered value from 'params'.

Fixes 3D floatland terrain generating everywhere.
  • Loading branch information
paramat committed Jun 28, 2017
1 parent 85d7b18 commit 6d2833a
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/mapgen_v7.cpp
Expand Up @@ -68,6 +68,7 @@ MapgenV7::MapgenV7(int mapgenid, MapgenV7Params *params, EmergeManager *emerge)
// This is to avoid a divide-by-zero.
// Parameter will be saved to map_meta.txt in limited form.
params->float_mount_height = MYMAX(params->float_mount_height, 1.0f);
this->float_mount_height = params->float_mount_height;

// 2D noise
noise_terrain_base = new Noise(&params->np_terrain_base, seed, csize.X, csize.Z);
Expand Down

0 comments on commit 6d2833a

Please sign in to comment.