People keep chasing the guards even after touching the light

This commit is contained in:
2014-06-22 11:44:12 -07:00
parent f0446cb164
commit 664a14d192

View File

@@ -383,6 +383,8 @@ var AISprite = function(game, x, y, key, frame) {
if ( hasState(this, STATE_RUNNINGTOLIGHT) == false ) { if ( hasState(this, STATE_RUNNINGTOLIGHT) == false ) {
var aiSprites = game.state.states.game.aiSprites; var aiSprites = game.state.states.game.aiSprites;
this.target = nearestInGroup(this, aiSprites, "townsfolk-guard"); this.target = nearestInGroup(this, aiSprites, "townsfolk-guard");
} else {
this.setAwarenessEffect(STATE_RELIEVED);
} }
} }
if ( this.target !== null && if ( this.target !== null &&