Game_Map.prototype.checkPassage = function(x, y, bit) {
var flags = this.tilesetFlags();
var tiles = this.allTiles(x, y);
for (var i = 0; i < tiles.length; i++) {
var flag = flags[tiles[i]];
if ((flag & 0x10) !== 0) // No effect on passage
continue;
if ((flag & bit) === 0) // [o] Passable
return true;
if ((flag & bit) === bit) // [x] Impassable
return false;
}
return false;
};
Game_Map.prototype.checkPassage = function(x, y, bit) {
var flags = this.tilesetFlags();
var tiles = this.allTiles(x, y);
for (var i = 0; i < tiles.length; i++) {
var flag = flags[tiles[i]];
if ((flag & 0x10) !== 0) // No effect on passage
continue;
if ((flag & bit) === 0) // [o] Passable
return true;
if ((flag & bit) === bit) // [x] Impassable
return false;
}
return false;
};