From 37dbd09f92cee97957a2cf6a293702f864ecf1af Mon Sep 17 00:00:00 2001 From: Detoria <44783518+theDetourist@users.noreply.github.com> Date: Mon, 26 Apr 2021 15:49:29 -0300 Subject: [PATCH 1/3] yoo --- source/PlayState.hx | 53 +++++++++++++++++++++++++++++++++++++-------- 1 file changed, 44 insertions(+), 9 deletions(-) diff --git a/source/PlayState.hx b/source/PlayState.hx index cacd2d3..d5f9a27 100644 --- a/source/PlayState.hx +++ b/source/PlayState.hx @@ -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 From d6681f402e51cebf06d85810f293104d08f19509 Mon Sep 17 00:00:00 2001 From: KadeDev Date: Mon, 26 Apr 2021 13:15:33 -0700 Subject: [PATCH 2/3] removed mashing for now --- source/PlayState.hx | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/source/PlayState.hx b/source/PlayState.hx index 65c406c..970715c 100644 --- a/source/PlayState.hx +++ b/source/PlayState.hx @@ -3273,9 +3273,11 @@ class PlayState extends MusicBeatState if (controlArray[coolNote.noteData]) { + goodNoteHit(coolNote, (mashing > getKeyPresses(coolNote))); + // ANTI MASH CODE FOR THE BOYS - if (mashing > getKeyPresses(coolNote) && mashViolations < 2) + /*if (mashing > getKeyPresses(coolNote) && mashViolations < 2) { mashViolations++; @@ -3303,8 +3305,8 @@ class PlayState extends MusicBeatState if (controlArray[ignoreList[shit]]) inIgnoreList = true; } - } - } + }*/ + //} } else if (possibleNotes[0].noteData == possibleNotes[1].noteData) { @@ -3667,7 +3669,9 @@ class PlayState extends MusicBeatState else if (controlArray[note.noteData]) { - if (mashing > getKeyPresses(note) && mashViolations <= 2) + goodNoteHit(note, (mashing > getKeyPresses(note))); + + /*if (mashing > getKeyPresses(note) && mashViolations <= 2) { mashViolations++; @@ -3686,7 +3690,7 @@ class PlayState extends MusicBeatState mashing = 0; } else - goodNoteHit(note, false); + goodNoteHit(note, false);*/ } } From 012a9c693d6d4bd00785deb8a409675dd7ed607d Mon Sep 17 00:00:00 2001 From: KadeDev Date: Mon, 26 Apr 2021 13:16:56 -0700 Subject: [PATCH 3/3] oops --- source/PlayState.hx | 32 +------------------------------- 1 file changed, 1 insertion(+), 31 deletions(-) diff --git a/source/PlayState.hx b/source/PlayState.hx index 970715c..08b8d53 100644 --- a/source/PlayState.hx +++ b/source/PlayState.hx @@ -3275,38 +3275,8 @@ class PlayState extends MusicBeatState goodNoteHit(coolNote, (mashing > getKeyPresses(coolNote))); - // ANTI MASH CODE FOR THE BOYS - - /*if (mashing > getKeyPresses(coolNote) && mashViolations < 2) - { - mashViolations++; - - goodNoteHit(coolNote, (mashing > getKeyPresses(coolNote))); - } - else - { - // this is bad but fuck you - playerStrums.members[0].animation.play('static'); - playerStrums.members[1].animation.play('static'); - playerStrums.members[2].animation.play('static'); - playerStrums.members[3].animation.play('static'); - health -= 0.2; - trace('mash ' + mashing); - } - - if (mashing != 0) - mashing = 0; } - else - { - var inIgnoreList:Bool = false; - for (shit in 0...ignoreList.length) - { - if (controlArray[ignoreList[shit]]) - inIgnoreList = true; - } - }*/ - //} + } } else if (possibleNotes[0].noteData == possibleNotes[1].noteData) {