From a847593e7526a9ff5e5f4bcf11822f04dd8d0ecd Mon Sep 17 00:00:00 2001 From: elexis Date: Thu, 16 Nov 2017 17:33:59 +0000 Subject: [PATCH] Fix some unintended obliteration in rP20420. In the Edge Seas variant, fix a wrong horizontal/vertical negation and the direction of the riversize randomization. Fix the wrong river location translation in that variant in r20429, refs #4851. Prevent resource collisions on Unknown maps by adding back the large territory marking (after the small territory marking prior to the terrain generation). Slightly improve river painting performance by not generating the meandering of the second shoreline if that is outside of the map boundary. git-svn-id: https://svn.wildfiregames.com/public/ps/trunk@20465 3db68df2-c116-0410-a063-a993310a9797 --- binaries/data/mods/public/maps/random/kerala.js | 2 +- .../mods/public/maps/random/the_unknown/unknown_common.js | 11 +++++------ 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/binaries/data/mods/public/maps/random/kerala.js b/binaries/data/mods/public/maps/random/kerala.js index 58165e893b..e3d60d312a 100644 --- a/binaries/data/mods/public/maps/random/kerala.js +++ b/binaries/data/mods/public/maps/random/kerala.js @@ -136,7 +136,7 @@ const waterPos = 0.31; const mountainPos = 0.69; paintRiver({ - "parallel": false, + "parallel": true, "startX": 0, "startZ": 0, "endX": 0, diff --git a/binaries/data/mods/public/maps/random/the_unknown/unknown_common.js b/binaries/data/mods/public/maps/random/the_unknown/unknown_common.js index aca2c97672..03654581ab 100644 --- a/binaries/data/mods/public/maps/random/the_unknown/unknown_common.js +++ b/binaries/data/mods/public/maps/random/the_unknown/unknown_common.js @@ -534,20 +534,19 @@ function unknownEdgeSeas() for (let location of pickRandom([["first"], ["second"], ["first", "second"]])) { - let margin = randFloat(0, scaleByMapSize(0, 0.1)); - let positionX = location == "first" ? [0, margin] : [1 - margin, 1]; + let positionX = location == "first" ? [0, 0] : [1, 1]; let positionZ = [0, 1]; - if (!horizontal) + if (horizontal) [positionX, positionZ] = [positionZ, positionX]; paintRiver({ - "parallel": false, + "parallel": true, "startX": positionX[0], "startZ": positionZ[0], "endX": positionX[1], "endZ": positionZ[1], - "width": 0.62, + "width": 0.62 - randFloat(0, scaleByMapSize(0, 0.1)), "fadeDist": 0.015, "deviation": 0, "waterHeight": waterHeight, @@ -1162,6 +1161,6 @@ function createUnknownPlayerBases() var cityRadius = radius/3; var placer = new ClumpPlacer(PI*cityRadius*cityRadius, 0.6, 0.3, 10, ix, iz); var painter = new LayeredPainter([tRoadWild, tRoad], [1]); - createArea(placer, [painter], null); + createArea(placer, [painter, paintClass(clPlayer)], null); } } -- 2.11.4.GIT