Mgv7: Fix undefined 'float_mount_height'
authorparamat <paramat@users.noreply.github.com>
Wed, 28 Jun 2017 08:35:46 +0000 (09:35 +0100)
committerSmallJoker <mk939@ymail.com>
Sun, 3 Jun 2018 15:31:59 +0000 (17:31 +0200)
Commit cad10ce3b747b721fd63784915e05f12bc488128 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.

src/mapgen_v7.cpp

index 3ac099d32dbfb1ba8535695c39d0b885a20775ab..44a42948b8aafa63f34bd09c0d3afb785fb9a8f9 100644 (file)
@@ -66,6 +66,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);