Skip to content
This repository has been archived by the owner on Oct 21, 2020. It is now read-only.

Commit

Permalink
Slow down progressively under deeper water.
Browse files Browse the repository at this point in the history
This preserves the deeper oceans while still having a good effect on shallow
water - it'll create a bit of a bulge near the coastline that looks more natural and
won't erode coastlines as much as the versions before.
  • Loading branch information
ahkok committed Dec 2, 2013
1 parent 3ef0195 commit 86fe6f9
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/org/foo_projects/sofar/Sedimentology/Sedimentology.java
Original file line number Diff line number Diff line change
Expand Up @@ -296,6 +296,17 @@ else if (underwater)
stat_ignored_water++;
return;
}

/* slow down when deeper under the sealevel */
if (underwater) {
if (y < world.getSeaLevel()) {
/* exponentially slower with depth. 100% at 1 depth, 50% at 2, 25% at 3 etc... */
if (rnd.nextDouble() > 2.0 * Math.pow(0.5, world.getSeaLevel() - y)) {
stat_ignored_water++;
return;
}
}
}

// vegetation slows down displacement
vegetationfactor = 1.0;
Expand Down

0 comments on commit 86fe6f9

Please sign in to comment.