1
0
forked from mirrors/0ad

Fix some unintended obliteration in efd9b3e212.

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 e596ef6011,
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.

This was SVN commit r20465.
This commit is contained in:
elexis
2017-11-16 17:33:59 +00:00
parent 5cfd4382dd
commit db9a52b94a
2 changed files with 6 additions and 7 deletions
@@ -136,7 +136,7 @@ const waterPos = 0.31;
const mountainPos = 0.69;
paintRiver({
"parallel": false,
"parallel": true,
"startX": 0,
"startZ": 0,
"endX": 0,
@@ -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);
}
}