Making townsfolk report you to a guard

This commit is contained in:
2014-06-19 20:18:40 -07:00
parent 23ec5dd231
commit dd589d8a58

View File

@@ -1058,16 +1058,16 @@ var AISprite = function(game, x, y, key, frame) {
this.target = nearestInGroup(this, aiSprites);
}
if ( this.target !== null ) {
var chaseStart = STATE_ALERTED;
if ( this.target.canSeeSprite(this) == true ) {
console.log("My target can see me!");
this.path_tween_stop();
this.path_purge();
var staticLights = game.state.states.game.staticLights;
this.target = nearestInGroup(staticLights);
chaseState = STATE_CONCERNED;
}
var chaseState = STATE_ALERTED;
this.chasetarget(this.target,
STATE_ALERTED,
STATE_MOVING | STATE_RUNNING,
false);
}