Skip to content

Commit

Permalink
Fix ClientSoundtrackPlayer
Browse files Browse the repository at this point in the history
  • Loading branch information
FirstMegaGame4 committed Dec 26, 2024
1 parent a659915 commit 028bd29
Showing 1 changed file with 9 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,9 @@ public void skip() {
if (this.currentPart == this.currentSoundtrack.getPartsCount() - 1) {
this.stop();
}
else {
this.play(this.currentSoundtrack, this.currentPart + 1);
}
}
}

Expand Down Expand Up @@ -89,7 +92,12 @@ public void tick() {
}
else {
if (!this.soundManager.isPlaying(this.instance)) {
this.skip();
if (this.currentSoundtrack.getPart(this.currentPart).isLooping()) {
this.play(this.currentSoundtrack, this.currentPart);
}
else {
this.skip();
}
}
}
}
Expand Down

0 comments on commit 028bd29

Please sign in to comment.