Ticket #4012: Phönicia.diff

File Phönicia.diff, 799 bytes (added by sanderd17, 8 years ago)
  • binaries/data/mods/public/maps/random/rmgen/map.js

     
    102102    }
    103103    else
    104104        // Within map square
    105         return x >= 0 && z >= 0 && x < this.size && z < this.size;
     105        return x >= 3 && z >= 3 && x < this.size - 3 && z < this.size - 3;
    106106};
    107107
    108108// Check bounds on tile map
    109109Map.prototype.inMapBounds = function(x, z)
    110110{
    111     return x >= 0 && z >= 0 && x < this.size && z < this.size;
     111    return x >= 3 && z >= 3 && x < this.size - 3 && z < this.size - 3;
    112112}
    113113
    114114// Check bounds on height map if TILE_CENTERED_HEIGHT_MAP==false then this is (size + 1 by size + 1) otherwise (size, size)