mirror of
https://gitea.wildfiregames.com/0ad/0ad.git
synced 2026-10-14 07:17:44 +00:00
Fix missing change in Ardennes Forest in 2ac3d3119d and create the explorable Area correctly following 9272153ee7.
This was SVN commit r20981.
This commit is contained in:
@@ -252,32 +252,25 @@ for (let size of [scaleByMapSize(50, 800), scaleByMapSize(50, 400), scaleByMapSi
|
||||
|
||||
Engine.SetProgress(50);
|
||||
|
||||
var explorableArea = {};
|
||||
explorableArea.points = [];
|
||||
|
||||
var explorablePoints = [];
|
||||
var playerClass = getTileClass(clPlayer);
|
||||
var hillDecoClass = getTileClass(clHillDeco);
|
||||
|
||||
for (var ix = 0; ix < mapSize; ix++)
|
||||
{
|
||||
for (var iz = 0; iz < mapSize; iz++)
|
||||
{
|
||||
let position = new Vector2D(ix, iz);
|
||||
var h = getHeight(ix,iz);
|
||||
|
||||
if(h > 15 && h < 45 && playerClass.countMembersInRadius(ix, iz, 1) == 0)
|
||||
{
|
||||
// explorable area
|
||||
var pt = {};
|
||||
pt.x = ix;
|
||||
pt.z = iz;
|
||||
explorableArea.points.push(pt);
|
||||
}
|
||||
explorablePoints.push(position);
|
||||
|
||||
if (h > 35 && randBool(0.1) ||
|
||||
h < 15 && randBool(0.05) && hillDecoClass.countMembersInRadius(ix, iz, 1) == 0)
|
||||
placeObject(ix + randFloat(0, 1), iz + randFloat(0, 1), pickRandom(aTrees), 0, randomAngle());
|
||||
}
|
||||
}
|
||||
|
||||
var explorableArea = g_Map.createArea(explorablePoints);
|
||||
|
||||
Engine.SetProgress(55);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user