Stop chasing me if you can't see me at the end of your path

This commit is contained in:
2014-06-17 23:30:17 -07:00
parent 21717965e2
commit d5407363d9

View File

@@ -720,7 +720,7 @@ var AISprite = function(game, x, y, key, frame) {
var distance = (new Phaser.Line(spr.x, spr.y, this.x, this.y).length);
if ( distance > vd ) {
console.log("Target is outside my view distance");
console.log("Target is outside my view distance (" + distance + " vs " + vd + ")");
return false;
}