1
0
forked from 0ad/0ad

Adding the demo Unknown-Nomad map.

This was SVN commit r12747.
This commit is contained in:
O.Davoodi 2012-10-11 15:32:10 +00:00
parent 6fd4a75312
commit 7f8adcf8cb
3 changed files with 1661 additions and 2 deletions

View File

@ -102,11 +102,14 @@ Map.prototype.getEntityID = function()
} }
// Check bounds on tile map // Check bounds on tile map
Map.prototype.validT = function(x, z) Map.prototype.validT = function(x, z, distance)
{ {
if (g_MapSettings.CircularMap) if (g_MapSettings.CircularMap)
{ // Within map circle { // Within map circle
if (distance == undefined)
var halfSize = Math.floor(0.5*this.size); var halfSize = Math.floor(0.5*this.size);
else
var halfSize = Math.floor(0.5*this.size)-distance;
var dx = (x - halfSize); var dx = (x - halfSize);
var dz = (z - halfSize); var dz = (z - halfSize);
return Math.round(Math.sqrt(dx*dx + dz*dz)) < halfSize; return Math.round(Math.sqrt(dx*dx + dz*dz)) < halfSize;

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,13 @@
{
"settings" : {
"Name" : "Unknown Nomad",
"Script" : "unknown_nomad.js",
"Description" : "The unknown... Players start with only some citizen soldiers and females. [color=\"red\"]Warning: AI players will cause the game to crash.[/color]",
"BaseTerrain" : ["medit_sand_wet"],
"BaseHeight" : -5,
"Preview" : "unknown.png",
"Keywords": ["demo"],
"CircularMap" : true,
"XXXXXX" : "Optionally define other things here, like we would for a scenario"
}
}