Increase view size when alerted, go concerned instead of alerted when player is below the light threshold but within view

This commit is contained in:
2014-06-15 15:24:02 -07:00
parent 50f9e32ec3
commit 1423b923d4

View File

@@ -703,12 +703,11 @@ var AISprite = function(game, x, y, key, frame) {
this.setAwarenessEffect = function(state) {
var animkey = "";
if ( (state == STATE_LOSTHIM) && (hasState(this, STATE_ALERTED) == false)) {
if ( hasState(this, state) == true ) {
return;
} else if ( (state == STATE_ALERTED) && (hasState(this, STATE_ALERTED) == true) ) {
} else if ( (state == STATE_LOSTHIM) && (hasState(this, STATE_ALERTED) == false)) {
return;
}
}
setAwarenessState(this, state);
if ( this.awareness_effect !== null ) {