Skip to content

Commit

Permalink
issue
Browse files Browse the repository at this point in the history
  • Loading branch information
Mythril382 authored Aug 12, 2023
1 parent f64a633 commit ab04678
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions core/src/mindustry/audio/SoundControl.java
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ public SoundControl(){
boolean boss = state.rules.spawns.contains(group -> group.getSpawned(state.wave - 2) > 0 && group.effect == StatusEffects.boss);

if(boss){
playOnce(bossMusic.random(lastRandomPlayed));
playOnce(state.rules.sector != null ? state.rules.sector.planet.bossMusic.random(lastRandomPlayed) : bossMusic.random(lastRandomPlayed));
}else if(Mathf.chance(musicWaveChance)){
playRandom();
}
Expand Down Expand Up @@ -208,9 +208,9 @@ protected void updateLoops(){
/** Plays a random track.*/
public void playRandom(){
if(isDark()){
playOnce(darkMusic.random(lastRandomPlayed));
playOnce(state.rules.sector != null ? state.rules.sector.planet.darkMusic.random(lastRandomPlayed) : darkMusic.random(lastRandomPlayed));
}else{
playOnce(ambientMusic.random(lastRandomPlayed));
playOnce(state.rules.sector != null ? state.rules.sector.planet.ambientMusic.random(lastRandomPlayed) : ambientMusic.random(lastRandomPlayed));
}
}

Expand Down

0 comments on commit ab04678

Please sign in to comment.