Making townsfolk report you to a guard

This commit is contained in:
2014-06-19 19:33:57 -07:00
parent 394bb37178
commit c2e14a4f94

View File

@@ -1073,8 +1073,13 @@ var AISprite = function(game, x, y, key, frame) {
console.log(nearest);
this.target = nearest;
}
if ( this.target !== null )
if ( this.target !== null ) {
if ( this.target(canSeeSprite, this) == true ) {
this.path_tween_stop();
this.path_purge();
}
this.chasetarget(this.target);
}
}
this.action_huntplayer = function()