Merge pull request #314 from theDetourist/completenotefix
Other half of the note trail fix
This commit is contained in:
commit
d6285331a5
@ -2595,6 +2595,49 @@ class PlayState extends MusicBeatState
|
||||
daNote.visible = true;
|
||||
daNote.active = true;
|
||||
}
|
||||
|
||||
if (!daNote.modifiedByLua)
|
||||
{
|
||||
if (FlxG.save.data.downscroll)
|
||||
{
|
||||
daNote.y = (strumLine.y + 0.45 * (Conductor.songPosition - daNote.strumTime) * FlxMath.roundDecimal(FlxG.save.data.scrollSpeed == 1 ? SONG.speed : FlxG.save.data.scrollSpeed, 2));
|
||||
if(daNote.isSustainNote)
|
||||
{
|
||||
// Remember = minus makes notes go up, plus makes them go down
|
||||
if(daNote.animation.curAnim.name.endsWith('end') && daNote.prevNote != null)
|
||||
daNote.y += daNote.prevNote.height;
|
||||
else
|
||||
daNote.y += daNote.height / 2;
|
||||
|
||||
if((!daNote.mustPress || daNote.wasGoodHit || daNote.prevNote.wasGoodHit && !daNote.canBeHit) && daNote.y - daNote.offset.y * daNote.scale.y + daNote.height >= (strumLine.y + Note.swagWidth / 2))
|
||||
{
|
||||
// Clip to strumline
|
||||
var swagRect = new FlxRect(0, 0, daNote.frameWidth * 2, daNote.frameHeight * 2);
|
||||
swagRect.height = (strumLine.y + Note.swagWidth / 2 - daNote.y) / daNote.scale.y;
|
||||
swagRect.y = daNote.frameHeight - swagRect.height;
|
||||
|
||||
daNote.clipRect = swagRect;
|
||||
}
|
||||
}
|
||||
}else
|
||||
{
|
||||
daNote.y = (strumLine.y - 0.45 * (Conductor.songPosition - daNote.strumTime) * FlxMath.roundDecimal(FlxG.save.data.scrollSpeed == 1 ? SONG.speed : FlxG.save.data.scrollSpeed, 2));
|
||||
if(daNote.isSustainNote)
|
||||
{
|
||||
daNote.y -= daNote.height / 2;
|
||||
|
||||
if((!daNote.mustPress || daNote.wasGoodHit || daNote.prevNote.wasGoodHit && !daNote.canBeHit) && daNote.y + daNote.offset.y * daNote.scale.y <= (strumLine.y + Note.swagWidth / 2))
|
||||
{
|
||||
// Clip to strumline
|
||||
var swagRect = new FlxRect(0, 0, daNote.width / daNote.scale.x, daNote.height / daNote.scale.y);
|
||||
swagRect.y = (strumLine.y + Note.swagWidth / 2 - daNote.y) / daNote.scale.y;
|
||||
swagRect.height -= swagRect.y;
|
||||
|
||||
daNote.clipRect = swagRect;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (!daNote.mustPress && daNote.wasGoodHit)
|
||||
{
|
||||
@ -2637,14 +2680,6 @@ class PlayState extends MusicBeatState
|
||||
notes.remove(daNote, true);
|
||||
daNote.destroy();
|
||||
}
|
||||
|
||||
if (!daNote.modifiedByLua)
|
||||
{
|
||||
if (FlxG.save.data.downscroll)
|
||||
daNote.y = (strumLine.y - (Conductor.songPosition - daNote.strumTime) * (-0.45 * FlxMath.roundDecimal(FlxG.save.data.scrollSpeed == 1 ? SONG.speed : FlxG.save.data.scrollSpeed, 2)));
|
||||
else
|
||||
daNote.y = (strumLine.y - (Conductor.songPosition - daNote.strumTime) * (0.45 * FlxMath.roundDecimal(FlxG.save.data.scrollSpeed == 1 ? SONG.speed : FlxG.save.data.scrollSpeed, 2)));
|
||||
}
|
||||
|
||||
if (daNote.mustPress && !daNote.modifiedByLua)
|
||||
{
|
||||
@ -3859,7 +3894,7 @@ class PlayState extends MusicBeatState
|
||||
|
||||
if (generatedMusic)
|
||||
{
|
||||
notes.sort(FlxSort.byY, FlxSort.DESCENDING);
|
||||
notes.sort(FlxSort.byY, (FlxG.save.data.downscroll ? FlxSort.ASCENDING : FlxSort.DESCENDING));
|
||||
}
|
||||
|
||||
#if windows
|
||||
|
Loading…
x
Reference in New Issue
Block a user