From 664a14d192b00e06f32025ad309443ffad6d42cd Mon Sep 17 00:00:00 2001 From: Andrew Kesterson Date: Sun, 22 Jun 2014 11:44:12 -0700 Subject: [PATCH] People keep chasing the guards even after touching the light --- moonlight/src/AISprite.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/moonlight/src/AISprite.js b/moonlight/src/AISprite.js index f9b45e9..4a09b15 100644 --- a/moonlight/src/AISprite.js +++ b/moonlight/src/AISprite.js @@ -383,6 +383,8 @@ var AISprite = function(game, x, y, key, frame) { if ( hasState(this, STATE_RUNNINGTOLIGHT) == false ) { var aiSprites = game.state.states.game.aiSprites; this.target = nearestInGroup(this, aiSprites, "townsfolk-guard"); + } else { + this.setAwarenessEffect(STATE_RELIEVED); } } if ( this.target !== null &&