diff --git a/moonlight/js/moonlight-skulk.js b/moonlight/js/moonlight-skulk.js index d594f45..d8f6b56 100644 --- a/moonlight/js/moonlight-skulk.js +++ b/moonlight/js/moonlight-skulk.js @@ -987,13 +987,13 @@ var AISprite = function(game, x, y, key, frame) { if ( this.path_index >= this.path.length ) { this.path_tween_stop(); - if ( x.canSeeSprite(player, false) == true ) { + if ( this.canSeeSprite(player, false) == true ) { this.path_set(player, true); this.path_tween_start(); } } else { if ( this.path_set(player, this.blocked(true)) == true ) - if ( x.canSeeSprite(player, false) == true ) { + if ( this.canSeeSprite(player, false) == true ) { this.path_tween_stop(); } else { this.path_tween_start();