mirror of
https://github.com/ninjamuffin99/Funkin.git
synced 2024-09-30 06:01:06 +00:00
fix several issues caused by sustain notes no longer being removed after correctly hit
This commit is contained in:
parent
f1d2fad105
commit
01e8800204
|
@ -171,16 +171,14 @@ class Note extends FlxSprite
|
||||||
|
|
||||||
if (mustPress)
|
if (mustPress)
|
||||||
{
|
{
|
||||||
// The * 0.5 us so that its easier to hit them too late, instead of too early
|
// The * 0.5 is so that it's easier to hit them too late, instead of too early
|
||||||
if (strumTime > Conductor.songPosition - Conductor.safeZoneOffset
|
if (strumTime > Conductor.songPosition - Conductor.safeZoneOffset
|
||||||
&& strumTime < Conductor.songPosition + (Conductor.safeZoneOffset * 0.5))
|
&& strumTime < Conductor.songPosition + (Conductor.safeZoneOffset * 0.5))
|
||||||
{
|
|
||||||
canBeHit = true;
|
canBeHit = true;
|
||||||
}
|
|
||||||
else
|
else
|
||||||
canBeHit = false;
|
canBeHit = false;
|
||||||
|
|
||||||
if (strumTime < Conductor.songPosition - Conductor.safeZoneOffset)
|
if (strumTime < Conductor.songPosition - Conductor.safeZoneOffset && !wasGoodHit)
|
||||||
tooLate = true;
|
tooLate = true;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -188,10 +186,8 @@ class Note extends FlxSprite
|
||||||
canBeHit = false;
|
canBeHit = false;
|
||||||
|
|
||||||
if (strumTime <= Conductor.songPosition)
|
if (strumTime <= Conductor.songPosition)
|
||||||
{
|
|
||||||
wasGoodHit = true;
|
wasGoodHit = true;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
if (tooLate)
|
if (tooLate)
|
||||||
{
|
{
|
||||||
|
|
|
@ -1562,14 +1562,6 @@ class PlayState extends MusicBeatState
|
||||||
// daNote.y = (strumLine.y - (songTime - daNote.strumTime) * (0.45 * PlayState.SONG.speed));
|
// daNote.y = (strumLine.y - (songTime - daNote.strumTime) * (0.45 * PlayState.SONG.speed));
|
||||||
|
|
||||||
if (daNote.y < -daNote.height)
|
if (daNote.y < -daNote.height)
|
||||||
{
|
|
||||||
if (daNote.isSustainNote && daNote.wasGoodHit)
|
|
||||||
{
|
|
||||||
daNote.kill();
|
|
||||||
notes.remove(daNote, true);
|
|
||||||
daNote.destroy();
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
{
|
||||||
if (daNote.tooLate || !daNote.wasGoodHit)
|
if (daNote.tooLate || !daNote.wasGoodHit)
|
||||||
{
|
{
|
||||||
|
@ -1584,7 +1576,6 @@ class PlayState extends MusicBeatState
|
||||||
notes.remove(daNote, true);
|
notes.remove(daNote, true);
|
||||||
daNote.destroy();
|
daNote.destroy();
|
||||||
}
|
}
|
||||||
}
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1864,7 +1855,7 @@ class PlayState extends MusicBeatState
|
||||||
|
|
||||||
notes.forEachAlive(function(daNote:Note)
|
notes.forEachAlive(function(daNote:Note)
|
||||||
{
|
{
|
||||||
if (daNote.canBeHit && daNote.mustPress && !daNote.tooLate)
|
if (daNote.canBeHit && daNote.mustPress && !daNote.tooLate && !daNote.wasGoodHit)
|
||||||
{
|
{
|
||||||
// the sorting probably doesn't need to be in here? who cares lol
|
// the sorting probably doesn't need to be in here? who cares lol
|
||||||
possibleNotes.push(daNote);
|
possibleNotes.push(daNote);
|
||||||
|
@ -1940,13 +1931,15 @@ class PlayState extends MusicBeatState
|
||||||
if (upP || rightP || downP || leftP)
|
if (upP || rightP || downP || leftP)
|
||||||
noteCheck(leftP, daNote);
|
noteCheck(leftP, daNote);
|
||||||
}
|
}
|
||||||
*/
|
|
||||||
|
//this is already done in noteCheck / goodNoteHit
|
||||||
if (daNote.wasGoodHit)
|
if (daNote.wasGoodHit)
|
||||||
{
|
{
|
||||||
daNote.kill();
|
daNote.kill();
|
||||||
notes.remove(daNote, true);
|
notes.remove(daNote, true);
|
||||||
daNote.destroy();
|
daNote.destroy();
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue