Fix beat code and pixel sustain ends

This commit is contained in:
CuckyDev
2021-07-12 01:43:05 -04:00
parent d48a72fca9
commit 11c76edd93
5 changed files with 50 additions and 23 deletions

View File

@ -2640,6 +2640,8 @@ class PlayState extends MusicBeatState
if (generatedMusic)
{
var holdArray:Array<Bool> = [controls.LEFT, controls.DOWN, controls.UP, controls.RIGHT];
notes.forEachAlive(function(daNote:Note)
{
// instead of doing stupid y > FlxG.height
@ -2661,14 +2663,12 @@ class PlayState extends MusicBeatState
{
if (daNote.mustPress)
daNote.y = (playerStrums.members[Math.floor(Math.abs(daNote.noteData))].y
+
0.45 * (Conductor.songPosition - daNote.strumTime) * FlxMath.roundDecimal(PlayStateChangeables.scrollSpeed == 1 ? SONG.speed : PlayStateChangeables.scrollSpeed,
2));
+ 0.45 * (Conductor.songPosition - daNote.strumTime) * FlxMath.roundDecimal(PlayStateChangeables.scrollSpeed == 1 ? SONG.speed : PlayStateChangeables.scrollSpeed,
2)) - daNote.noteYOff;
else
daNote.y = (strumLineNotes.members[Math.floor(Math.abs(daNote.noteData))].y
+
0.45 * (Conductor.songPosition - daNote.strumTime) * FlxMath.roundDecimal(PlayStateChangeables.scrollSpeed == 1 ? SONG.speed : PlayStateChangeables.scrollSpeed,
2));
+ 0.45 * (Conductor.songPosition - daNote.strumTime) * FlxMath.roundDecimal(PlayStateChangeables.scrollSpeed == 1 ? SONG.speed : PlayStateChangeables.scrollSpeed,
2)) - daNote.noteYOff;
if (daNote.isSustainNote)
{
// Remember = minus makes notes go up, plus makes them go down
@ -2710,11 +2710,11 @@ class PlayState extends MusicBeatState
if (daNote.mustPress)
daNote.y = (playerStrums.members[Math.floor(Math.abs(daNote.noteData))].y
- 0.45 * (Conductor.songPosition - daNote.strumTime) * FlxMath.roundDecimal(PlayStateChangeables.scrollSpeed == 1 ? SONG.speed : PlayStateChangeables.scrollSpeed,
2));
2)) + daNote.noteYOff;
else
daNote.y = (strumLineNotes.members[Math.floor(Math.abs(daNote.noteData))].y
- 0.45 * (Conductor.songPosition - daNote.strumTime) * FlxMath.roundDecimal(PlayStateChangeables.scrollSpeed == 1 ? SONG.speed : PlayStateChangeables.scrollSpeed,
2));
2)) + daNote.noteYOff;
if (daNote.isSustainNote)
{
daNote.y -= daNote.height / 2;