Open ftomassetti opened 8 years ago
You can always link to the line of code instead: https://github.com/Mindwerks/worldengine/blob/master/worldengine/simulations/erosion.py#L390
if newElevation <= world.layers['elevation'].data[ry, rx]:
print('newElevation is <= than river, fix me...')
newElevation = world.layers['elevation'].data[r, x]
^-- I put that in there to catch issues newElevation being lower than current elevation (it mustn't be lower than the river itself) so we reset it back to the original value. However, this could be 'dead' code and is never run. Might have just been lucky.
There are a few things in that code that don't make sense... right now (page miss!). Like line: https://github.com/Mindwerks/worldengine/blob/master/worldengine/simulations/erosion.py#L371 I'll give it an eye-over.
Lines 385-390 of worldengine/simulations/erosion.py
I think that
world.layers['elevation'].data[r, x]
is wrong. It should be insteadorld.layers['elevation'].data[ry, rx]
. Am I missing something?