Merge lp:~alocritani/widelands/fix_editor_noise_height_tool into lp:widelands
Proposed by
Angelo Locritani
Status: | Merged |
---|---|
Merged at revision: | 6173 |
Proposed branch: | lp:~alocritani/widelands/fix_editor_noise_height_tool |
Merge into: | lp:widelands |
Diff against target: |
12 lines (+1/-1) 1 file modified
src/editor/tools/editor_noise_height_tool.cc (+1/-1) |
To merge this branch: | bzr merge lp:~alocritani/widelands/fix_editor_noise_height_tool |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Widelands Developers | Pending | ||
Review via email: mp+86899@code.launchpad.net |
Description of the change
At the moment, the noise height tool returns an height between min + (min-max) * rand and min.
In other words, it lowers terrain below the min value; this is not what the user expect and creates problem (negative value of terrain height -> very high value because of the "negative overflow" -> assertion height <= max_height failed) if you set the gap between min and max to high value (ie: min=0, max = 10).
This branch changes it in order to return a value between min and min+(max-
so min = 0, max = 10 -> 0<=values<=10
To post a comment you must log in.