Skip to content

Commit

Permalink
fix room music playing when in another scene
Browse files Browse the repository at this point in the history
  • Loading branch information
orsi committed Jun 3, 2020
1 parent 3b43a27 commit 44a7552
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion script/room.js
Original file line number Diff line number Diff line change
Expand Up @@ -718,7 +718,11 @@ var Room = {
Room._fireTimer = Engine.setTimeout(Room.coolFire, Room._FIRE_COOL_DELAY);
Room.updateButton();
Room.setTitle();
Room.setMusic();

// only update music if in the room
if (Engine.activeModule == Room) {
Room.setMusic();
}
},

coolFire: function () {
Expand Down

0 comments on commit 44a7552

Please sign in to comment.