Skip to content

Commit

Permalink
Fix: TerraGenesis was not generating maps at the requested maximum he…
Browse files Browse the repository at this point in the history
…ight

- Maps were being generated with a maximum height one level lower than intended
  • Loading branch information
SamuXarick committed Jan 3, 2020
1 parent a0f745b commit d73f662
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/tgp.cpp
Expand Up @@ -235,7 +235,7 @@ static height_t TGPGetMaxHeight()
};

int max_height_from_table = max_height[_settings_game.difficulty.terrain_type][min(MapLogX(), MapLogY()) - MIN_MAP_SIZE_BITS];
return I2H(min(_settings_game.game_creation.landscape == LT_ARCTIC ? max(6, max_height_from_table) : max_height_from_table, _settings_game.construction.max_heightlevel));
return I2H(min(_settings_game.game_creation.landscape == LT_ARCTIC ? max(6, max_height_from_table) : max_height_from_table, _settings_game.construction.max_heightlevel + 1));
}

/**
Expand Down

0 comments on commit d73f662

Please sign in to comment.