People keep chasing the guards even after touching the light
This commit is contained in:
@@ -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 &&
|
||||||
|
|||||||
Reference in New Issue
Block a user