forked from 0ad/0ad
Fixes a bug for random maps where Map.validT didn't apply the distance parameter properly on rectangular maps. Fixes #4012
This was SVN commit r18312.
This commit is contained in:
parent
3cf766126b
commit
0bf90da597
@ -102,7 +102,7 @@ Map.prototype.validT = function(x, z, distance)
|
||||
}
|
||||
else
|
||||
// Within map square
|
||||
return x >= 0 && z >= 0 && x < this.size && z < this.size;
|
||||
return x >= distance && z >= distance && x < this.size - distance && z < this.size - distance;
|
||||
};
|
||||
|
||||
// Check bounds on tile map
|
||||
|
Loading…
Reference in New Issue
Block a user