diff --git a/binaries/data/mods/public/maps/random/danubius.js b/binaries/data/mods/public/maps/random/danubius.js index c71919b667..103201a516 100644 --- a/binaries/data/mods/public/maps/random/danubius.js +++ b/binaries/data/mods/public/maps/random/danubius.js @@ -378,10 +378,11 @@ paintRiver({ "meanderShort": 30, "meanderLong": 0, "waterFunc": (position, height, riverFraction) => { + let origPos = position.clone().rotateAround(-startAngle, mapCenter); // Distinguish left and right shoreline if (0 < height && height < 1 && - position.y > ShorelineDistance && position.y < mapSize - ShorelineDistance) - clShore[position.x < mapCenter.x ? 0 : 1].add(position); + origPos.y > ShorelineDistance && origPos.y < mapSize - ShorelineDistance) + clShore[origPos.x < mapCenter.x ? 0 : 1].add(position); }, "landFunc": (position, shoreDist1, shoreDist2) => { diff --git a/binaries/data/mods/public/maps/random/rmgen/gaia_terrain.js b/binaries/data/mods/public/maps/random/rmgen/gaia_terrain.js index fdf1822ae7..62eb89af87 100644 --- a/binaries/data/mods/public/maps/random/rmgen/gaia_terrain.js +++ b/binaries/data/mods/public/maps/random/rmgen/gaia_terrain.js @@ -392,9 +392,8 @@ function paintRiver(args) let deviation = args.deviation * randFloat(-1, 1); // Compute the distance to the shoreline. - let sign = Math.sign(distanceToRiver || 1); - let shoreDist1 = sign * riverCurve1 + Math.abs(distanceToRiver) - deviation - args.width / 2; - let shoreDist2 = sign * riverCurve2 + Math.abs(distanceToRiver) - deviation + args.width / 2; + let shoreDist1 = riverCurve1 + distanceToRiver - deviation - args.width / 2; + let shoreDist2 = riverCurve2 + distanceToRiver - deviation + args.width / 2; // Create the elevation for the water and the slopy shoreline and call the user functions. if (shoreDist1 < 0 && shoreDist2 > 0)