From 02fd77d9608285ca568c79562af1d51e6eced99f Mon Sep 17 00:00:00 2001 From: Andrew Kesterson Date: Thu, 19 Jun 2014 18:59:12 -0700 Subject: [PATCH] Making townsfolk report you to a guard --- moonlight/js/moonlight-skulk.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/moonlight/js/moonlight-skulk.js b/moonlight/js/moonlight-skulk.js index 202961e..a5f1659 100644 --- a/moonlight/js/moonlight-skulk.js +++ b/moonlight/js/moonlight-skulk.js @@ -1083,7 +1083,8 @@ var AISprite = function(game, x, y, key, frame) { } this.target = spr; } - this.chasetarget(spr); + if ( this.target !== null ) + this.chasetarget(this.target); } this.action_huntplayer = function() @@ -1192,7 +1193,7 @@ var AISprite = function(game, x, y, key, frame) { pathfinder_grid = []; this.walkables = []; this.path = []; - this.target = player; + this.target = null; this.path_tweens = []; this.path_maximum_steps = 4; this.awareness_change_enabled = true;