From 4d88653a0669f8a674d5dcf2f76b817cf2ea27dc Mon Sep 17 00:00:00 2001 From: Andrew Kesterson Date: Sun, 22 Jun 2014 16:38:18 -0700 Subject: [PATCH] Reporting townspeople should send the guard to the player's last known locatio n - more than once --- moonlight/src/AISprite.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/moonlight/src/AISprite.js b/moonlight/src/AISprite.js index 447b493..20cdb2e 100644 --- a/moonlight/src/AISprite.js +++ b/moonlight/src/AISprite.js @@ -409,7 +409,8 @@ var AISprite = function(game, x, y, key, frame) { var aiSprites = game.state.states.game.aiSprites; this.target = nearestInGroup(this, aiSprites, "townsfolk-guard"); } else if ( hasState(this, STATE_RUNNINGTOLIGHT) == false ) { - this.target.rotation_timer.stop(); + if ( this.target.rotation_timer !== null ) + this.target.rotation_timer.stop(); this.target.setAwarenessEffect(STATE_ALERTED); this.target.target = this.lastSawPlayerAt; addState(this.target, STATE_RUNNINGTOREPORT);