From cc03e96970441286c64f5721c14b07d0b50f7265 Mon Sep 17 00:00:00 2001 From: Andrew Kesterson Date: Sun, 22 Jun 2014 12:21:52 -0700 Subject: [PATCH] People keep chasing the guards even after touching the light - busted logic re: seeing the target --- moonlight/src/AISprite.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/moonlight/src/AISprite.js b/moonlight/src/AISprite.js index ff11da4..a2fae35 100644 --- a/moonlight/src/AISprite.js +++ b/moonlight/src/AISprite.js @@ -355,7 +355,7 @@ var AISprite = function(game, x, y, key, frame) { } } else { 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_tween_stop(); } else {