Procházet zdrojové kódy

bug: Fixed an issue in blocking tile indices that was causing some water tiles to be walkable

tags/v0.9.0^2
Shaun před 3 roky
rodič
revize
dd62f5a727
1 změnil soubory, kde provedl 14 přidání a 11 odebrání
  1. +14
    -11
      src/server/world/map.js

+ 14
- 11
src/server/world/map.js Zobrazit soubor

@@ -366,20 +366,23 @@ module.exports = {

const offsetCell = this.getOffsetCellPos(sheetName, cellInfo.cell);

if ((layerName !== 'hiddenWalls') && (layerName !== 'hiddenTiles')) {
let layer = this.layers;
const isHiddenLayer = layerName.indexOf('hidden') === 0;

if (isHiddenLayer)
this[layerName][x][y] = offsetCell;
else {
const layer = this.layers;

if (this.oldLayers[layerName])
this.oldLayers[layerName][x][y] = offsetCell;

layer[x][y] = (layer[x][y] === null) ? offsetCell : layer[x][y] + ',' + offsetCell;
} else if (layerName === 'hiddenWalls')
this.hiddenWalls[x][y] = offsetCell;
else if (layerName === 'hiddenTiles')
this.hiddenTiles[x][y] = offsetCell;

if (layerName.indexOf('walls') > -1)
this.collisionMap[x][y] = 1;
else if (clientConfig.config.blockingTileIndices.includes(offsetCell))
this.collisionMap[x][y] = 1;

if (layerName.indexOf('walls') > -1)
this.collisionMap[x][y] = 1;
else if (clientConfig.config.blockingTileIndices.includes(offsetCell))
this.collisionMap[x][y] = 1;
}
},

object: function (layerName, cell) {


Načítá se…
Zrušit
Uložit