mirror of
https://github.com/minetest/minetest.git
synced 2024-11-09 17:23:45 +01:00
Ensure that heightmap is initialized before use
Without this, cavegen will use values in the heightmap before they are initialized.
This commit is contained in:
parent
e74b8da54e
commit
d4e210ee95
@ -56,6 +56,7 @@ 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;
|
||||
|
Loading…
Reference in New Issue
Block a user