Skip to content

Commit

Permalink
unlock condition fix
Browse files Browse the repository at this point in the history
  • Loading branch information
pavle-goloskokovic committed Dec 27, 2024
1 parent 5dab696 commit 42979bb
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions src/sound/webaudio/WebAudioSoundManager.js
Original file line number Diff line number Diff line change
Expand Up @@ -81,13 +81,16 @@ var WebAudioSoundManager = new Class({

BaseSoundManager.call(this, game);

if (this.locked && game.isBooted)
if (this.locked)
{
this.unlock();
}
else
{
game.events.once(GameEvents.BOOT, this.unlock, this);
if (game.isBooted)
{
this.unlock();
}
else
{
game.events.once(GameEvents.BOOT, this.unlock, this);
}
}
},

Expand Down

0 comments on commit 42979bb

Please sign in to comment.