Stop switching awareness states so fast

This commit is contained in:
2014-06-15 15:52:37 -07:00
parent 2841af5d54
commit 06415ddfb6

View File

@@ -715,7 +715,6 @@ var AISprite = function(game, x, y, key, frame) {
return; return;
} }
setAwarenessState(this, state);
if ( this.awareness_change_enabled == false && if ( this.awareness_change_enabled == false &&
state != STATE_ALERTED ) { state != STATE_ALERTED ) {
return; return;
@@ -729,6 +728,8 @@ var AISprite = function(game, x, y, key, frame) {
this); this);
this.awareness_timer.start() this.awareness_timer.start()
setAwarenessState(this, state);
if ( this.awareness_effect !== null ) { if ( this.awareness_effect !== null ) {
this.awareness_effect.alive = false; this.awareness_effect.alive = false;
this.awareness_effect.destroy(); this.awareness_effect.destroy();