Guards don't contact the player anymore and people continue chasing the guards

This commit is contained in:
2014-06-22 11:30:55 -07:00
parent 6feaad410e
commit f0446cb164

View File

@@ -83,7 +83,7 @@ function nearestWalkableTile(spr)
(y == starty) ||
(y == endy) ) {
console.log(pathfinder_grid);
if ( pathfinder_grid.nodes[x][y].walkable == true ) {
if ( pathfinder_grid.nodes[y][x].walkable == true ) {
console.log([x, y]);
return [x, y];
}