From cd340f9b8c915d3e3c98d961ba125e794f8e2676 Mon Sep 17 00:00:00 2001 From: Andrew Kesterson Date: Thu, 19 Jun 2014 20:58:22 -0700 Subject: [PATCH] Making townsfolk report you to a guard --- moonlight/js/moonlight-skulk.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/moonlight/js/moonlight-skulk.js b/moonlight/js/moonlight-skulk.js index 0e22d74..f7fd0f6 100644 --- a/moonlight/js/moonlight-skulk.js +++ b/moonlight/js/moonlight-skulk.js @@ -1066,10 +1066,9 @@ var AISprite = function(game, x, y, key, frame) { if (this.target.canSeeSprite(this) == true) targetseesyou = true; } - if ( targetseesyou || - (game.physics.arcade.collide(this, this.target) == true) ) { + if ( (game.physics.arcade.collide(this, this.target) == true) || + targetseesyou == true ) { if ( hasState(this, STATE_RUNNINGTOLIGHT) == false ) { - console.log("My target can see me!"); this.path_tween_stop(); this.path_purge(); var staticLights = game.state.states.game.staticLights;