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

This commit is contained in:
2014-06-17 23:18:29 -07:00
parent 2c71af4339
commit 8c76507960

View File

@@ -714,7 +714,7 @@ var AISprite = function(game, x, y, key, frame) {
this.canSeeSprite = function(spr, debug) {
var vd = this.view_distance;
if ( hasState(this, STATE_ALERTED) ) {
if ( hasState(this, STATE_ALERTED) )
vd = vd * 2;
var xd = (spr.x - this.x);