From 0bf90da597c6e2bb28056d013201a3b667b3fec9 Mon Sep 17 00:00:00 2001 From: FeXoR Date: Fri, 3 Jun 2016 15:29:28 +0000 Subject: [PATCH] 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. --- binaries/data/mods/public/maps/random/rmgen/map.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/binaries/data/mods/public/maps/random/rmgen/map.js b/binaries/data/mods/public/maps/random/rmgen/map.js index 8e9306a365..bcf4d3a5a0 100644 --- a/binaries/data/mods/public/maps/random/rmgen/map.js +++ b/binaries/data/mods/public/maps/random/rmgen/map.js @@ -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