mirror of
https://gitlab.com/gaelysam/mapgen_rivers.git
synced 2024-11-13 06:10:21 +01:00
Fixed sea level variations
This commit is contained in:
parent
e0aecdc3f3
commit
85e545d5ac
10
generate.py
10
generate.py
|
@ -95,11 +95,6 @@ niter = int(get_setting('niter', 10))
|
|||
### MAKE INITIAL TOPOGRAPHY
|
||||
n = np.zeros((mapsize+1, mapsize+1))
|
||||
|
||||
if sea_level_variations != 0.0:
|
||||
sea_ybase = np.random.randint(8192)-4096
|
||||
sea_level_ref = snoise2(time * (1-1/niter) / sea_level_variations, sea_ybase, **params_sealevel) * sea_level_variations
|
||||
offset -= (sea_level_ref + sea_level)
|
||||
|
||||
# Set noise parameters
|
||||
params = {
|
||||
"offset" : offset,
|
||||
|
@ -116,6 +111,11 @@ params_sealevel = {
|
|||
"lacunarity" : 2,
|
||||
}
|
||||
|
||||
if sea_level_variations != 0.0:
|
||||
sea_ybase = np.random.randint(8192)-4096
|
||||
sea_level_ref = snoise2(time * (1-1/niter) / sea_level_variations, sea_ybase, **params_sealevel) * sea_level_variations
|
||||
params['offset'] -= (sea_level_ref + sea_level)
|
||||
|
||||
n = noisemap(mapsize+1, mapsize+1, **params)
|
||||
|
||||
### COMPUTE LANDSCAPE EVOLUTION
|
||||
|
|
Loading…
Reference in New Issue
Block a user