Browse Source

Fixes #8

tags/v0.1.2^2
Big Bad Waffle 7 years ago
parent
commit
62183c3874
1 changed files with 10 additions and 2 deletions
  1. +10
    -2
      src/server/world/physics.js

+ 10
- 2
src/server/world/physics.js View File

@@ -203,7 +203,6 @@ define([
var cells = this.cells;
var grid = this.graph.grid;

var result = [];
for (var i = x1; i <= x2; i++) {
var row = cells[i];
var gridRow = grid[i];
@@ -217,11 +216,20 @@ define([
x: i,
y: j
};
} else {
//If the only contents are notices, we can still use it
var allNotices = !cell.some(c => !c.notice);
if (allNotices) {
return {
x: i,
y: j
};
}
}
}
}

return result;
return null;
},

getPath: function(from, to) {


Loading…
Cancel
Save