fix: crash on fast-forwarded music player
This commit is contained in:
parent
eb772916dc
commit
1bd5965ba1
@ -43,7 +43,7 @@ class MusicPlayer(val seed: Long, val level: Level, val pos: BlockPos, val start
|
|||||||
|
|
||||||
init {
|
init {
|
||||||
val currentRemaining = totalTime - (level.gameTime - startedAt)
|
val currentRemaining = totalTime - (level.gameTime - startedAt)
|
||||||
while (remainingTime > currentRemaining) {
|
while (remainingTime > currentRemaining && !isEnd) {
|
||||||
// seek to current position
|
// seek to current position
|
||||||
remainingTime -= fetchNote().time
|
remainingTime -= fetchNote().time
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user