Skip to content

Commit

Permalink
Mapgen V7: Remove now-unused ridge heightmap
Browse files Browse the repository at this point in the history
  • Loading branch information
kwolekr committed May 28, 2016
1 parent 548d99b commit c596804
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 10 deletions.
10 changes: 2 additions & 8 deletions src/mapgen_v7.cpp
Expand Up @@ -62,8 +62,7 @@ MapgenV7::MapgenV7(int mapgenid, MapgenParams *params, EmergeManager *emerge)
// 1-up 1-down overgeneration
this->zstride_1u1d = csize.X * (csize.Y + 2);

this->heightmap = new s16[csize.X * csize.Z];
this->ridge_heightmap = new s16[csize.X * csize.Z];
this->heightmap = new s16[csize.X * csize.Z];

MapgenV7Params *sp = (MapgenV7Params *)params->sparams;

Expand Down Expand Up @@ -134,7 +133,6 @@ MapgenV7::~MapgenV7()

delete biomegen;

delete[] ridge_heightmap;
delete[] heightmap;
}

Expand Down Expand Up @@ -440,8 +438,7 @@ int MapgenV7::generateTerrain()
for (s16 z = node_min.Z; z <= node_max.Z; z++)
for (s16 x = node_min.X; x <= node_max.X; x++, index2d++) {
s16 surface_y = baseTerrainLevelFromMap(index2d);
heightmap[index2d] = surface_y; // Create base terrain heightmap
ridge_heightmap[index2d] = surface_y;
heightmap[index2d] = surface_y; // Create base terrain heightmap

if (surface_y > stone_surface_max_y)
stone_surface_max_y = surface_y;
Expand Down Expand Up @@ -504,9 +501,6 @@ void MapgenV7::generateRidgeTerrain()
if (nridge + width_mod * height_mod < 0.6)
continue;

if (y < ridge_heightmap[j])
ridge_heightmap[j] = y - 1;

vm->m_data[vi] = (y > water_level) ? n_air : n_water;
}
}
Expand Down
2 changes: 0 additions & 2 deletions src/mapgen_v7.h
Expand Up @@ -58,8 +58,6 @@ class MapgenV7 : public MapgenBasic {
public:
int zstride_1u1d;

s16 *ridge_heightmap;

u32 spflags;
Noise *noise_terrain_base;
Noise *noise_terrain_alt;
Expand Down

0 comments on commit c596804

Please sign in to comment.