From 69da8831eca52de870c7f7bd9446fb523784b1ce Mon Sep 17 00:00:00 2001 From: Andrew Kesterson Date: Wed, 18 Jun 2014 09:06:32 -0700 Subject: [PATCH] Stop chasing me if you can't see me at the end of your path --- moonlight/js/moonlight-skulk.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/moonlight/js/moonlight-skulk.js b/moonlight/js/moonlight-skulk.js index 038b88a..03ccfc2 100644 --- a/moonlight/js/moonlight-skulk.js +++ b/moonlight/js/moonlight-skulk.js @@ -733,6 +733,7 @@ var AISprite = function(game, x, y, key, frame) { return true; } console.log("I have a view rectangle but it does not intersect or contain the target"); + console.log(viewrect, sprrect); return false; } @@ -1016,7 +1017,7 @@ var AISprite = function(game, x, y, key, frame) { if ( this.rotation_timer == null ) { console.log("I can't see the player - turning so I can"); this.rotation_timer = game.time.create(false); - timerev = this.rotation_timer.add(1000, this.turnFaceRight, this); + timerev = this.rotation_timer.add(500, this.turnFaceRight, this); this.rotation_timer.start() } }