People keep chasing the guards even after touching the light - busted logic re: seeing the target

This commit is contained in:
2014-06-22 12:21:52 -07:00
parent e9bcefcff6
commit cc03e96970

View File

@@ -355,7 +355,7 @@ var AISprite = function(game, x, y, key, frame) {
} }
} else { } else {
if ( this.path_set(target, this.blocked(true), maxsteps, useNearestWalkable) == true ) { if ( this.path_set(target, this.blocked(true), maxsteps, useNearestWalkable) == true ) {
if ( (visual == false) || (this.canSeeSprite(target, false) == false )) { if ( (visual == true) && (this.canSeeSprite(target, false) == false )) {
this.path_purge(); this.path_purge();
this.path_tween_stop(); this.path_tween_stop();
} else { } else {