Let awareness images replay over and over

This commit is contained in:
2014-06-15 19:45:35 -07:00
parent c033eaea15
commit 747361adc4

View File

@@ -723,7 +723,11 @@ var AISprite = function(game, x, y, key, frame) {
this.setAwarenessEffect = function(state) {
var animkey = "";
if ( (state == STATE_LOSTHIM) &&
if ( hasState(this, state) == true ) {
// restart the awareness timer
this.startAwarenessTimer();
return;
} else if ( (state == STATE_LOSTHIM) &&
(hasState(this, STATE_ALERTED) == false) &&
(hasState(this, STATE_CONCERNED) == false) ) {
return;