Skip to content

Commit 216dd95

Browse files
this should fix the song not ending when it should
closes #940
1 parent c2e0250 commit 216dd95

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

source/PlayState.hx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5588,7 +5588,7 @@ class PlayState extends MusicBeatState
55885588

55895589
if (!targetNote.wasHit)
55905590
{
5591-
while (targetNote != null && targetNote.strumTime <= Conductor.songPosition) {
5591+
while (targetNote != null && targetNote.strumTime <= Conductor.songPosition - ClientPrefs.noteOffset) {
55925592
targetNote.wasHit = true;
55935593
targetNote.mustPress ? goodNoteHit(null, targetNote) : opponentNoteHit(null, targetNote);
55945594
notesAddedCount++;
@@ -6217,7 +6217,7 @@ class PlayState extends MusicBeatState
62176217
{
62186218
var timeSub:Float = Conductor.songPosition - Conductor.offset;
62196219
var syncTime:Float = 20 * Math.max(playbackRate, 1);
6220-
if (Math.abs(FlxG.sound.music.time - timeSub) > syncTime ||
6220+
if (FlxG.sound.music.time < FlxG.sound.music.length && Math.abs(FlxG.sound.music.time - timeSub) > syncTime ||
62216221
(vocals.length > 0 && vocals.time < vocals.length && Math.abs(vocals.time - timeSub) > syncTime) ||
62226222
(opponentVocals.length > 0 && opponentVocals.time < opponentVocals.length && Math.abs(opponentVocals.time - timeSub) > syncTime))
62236223
{

0 commit comments

Comments
 (0)