People keep chasing the guards even after touching the light

This commit is contained in:
2014-06-22 11:46:18 -07:00
parent 664a14d192
commit 1e2424e427

View File

@@ -385,6 +385,7 @@ var AISprite = function(game, x, y, key, frame) {
this.target = nearestInGroup(this, aiSprites, "townsfolk-guard"); this.target = nearestInGroup(this, aiSprites, "townsfolk-guard");
} else { } else {
this.setAwarenessEffect(STATE_RELIEVED); this.setAwarenessEffect(STATE_RELIEVED);
return;
} }
} }
if ( this.target !== null && if ( this.target !== null &&