From b1e350394c49c0f62fe3a31bb5d8d6959f85c773 Mon Sep 17 00:00:00 2001 From: Andrew Kesterson Date: Thu, 19 Jun 2014 20:56:18 -0700 Subject: [PATCH] Making townsfolk report you to a guard --- moonlight/js/moonlight-skulk.js | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/moonlight/js/moonlight-skulk.js b/moonlight/js/moonlight-skulk.js index d8aabb4..0e22d74 100644 --- a/moonlight/js/moonlight-skulk.js +++ b/moonlight/js/moonlight-skulk.js @@ -1066,12 +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 ( hasState(this, STATE_RUNNINGTOLIGHT) == true ) { - return; - } else { + if ( hasState(this, STATE_RUNNINGTOLIGHT) == false ) { console.log("My target can see me!"); this.path_tween_stop(); this.path_purge();