Przeglądaj źródła

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

tags/v0.9.0^2
Shaun 3 lat temu
rodzic
commit
dd62f5a727
1 zmienionych plików z 14 dodań i 11 usunięć
  1. +14
    -11
      src/server/world/map.js

+ 14
- 11
src/server/world/map.js Wyświetl plik

@@ -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) {


Ładowanie…
Anuluj
Zapisz