Mgv7: Fix undefined 'float_mount_height'
authorparamat <paramat@users.noreply.github.com>
Wed, 28 Jun 2017 08:35:46 +0000 (09:35 +0100)
committerparamat <mat.gregory@virginmedia.com>
Wed, 28 Jun 2017 10:48:17 +0000 (11:48 +0100)
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 4b1844a750f50b9f78135c7e574bfef3a6bb1f50..e361a8f12a4479094a044ee26b9712b5a78ca7c6 100644 (file)
@@ -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);