revert it because im so fucking sick and tired of this bullshit

This commit is contained in:
Kade M 2021-06-04 19:56:32 -07:00
parent 22f99d1f1f
commit 9e22af2d28
3 changed files with 32 additions and 79 deletions

View File

@ -25,7 +25,6 @@ class Note extends FlxSprite
public var prevNote:Note; public var prevNote:Note;
public var modifiedByLua:Bool = false; public var modifiedByLua:Bool = false;
public var sustainLength:Float = 0; public var sustainLength:Float = 0;
public var hit:Bool = false;
public var isSustainNote:Bool = false; public var isSustainNote:Bool = false;
public var noteScore:Float = 1; public var noteScore:Float = 1;
@ -51,9 +50,7 @@ class Note extends FlxSprite
x += 50; x += 50;
// MAKE SURE ITS DEFINITELY OFF SCREEN? // MAKE SURE ITS DEFINITELY OFF SCREEN?
y -= 2000; y -= 2000;
this.strumTime = strumTime;
// Take half the sprite's height to compensate for the offset down below
this.strumTime = strumTime - frameHeight / 2;
if (this.strumTime < 0 ) if (this.strumTime < 0 )
this.strumTime = 0; this.strumTime = 0;
@ -128,6 +125,14 @@ class Note extends FlxSprite
animation.play('redScroll'); animation.play('redScroll');
} }
// trace(prevNote);
// we make sure its downscroll and its a SUSTAIN NOTE (aka a trail, not a note)
// and flip it so it doesn't look weird.
// THIS DOESN'T FUCKING FLIP THE NOTE, CONTRIBUTERS DON'T JUST COMMENT THIS OUT JESUS
if (FlxG.save.data.downscroll && sustainNote)
flipY = true;
if (isSustainNote && prevNote != null) if (isSustainNote && prevNote != null)
{ {
noteScore * 0.2; noteScore * 0.2;
@ -135,10 +140,6 @@ class Note extends FlxSprite
x += width / 2; x += width / 2;
flipY = true;
offset.y = frameHeight;
switch (noteData) switch (noteData)
{ {
case 2: case 2:
@ -160,8 +161,6 @@ class Note extends FlxSprite
if (prevNote.isSustainNote) if (prevNote.isSustainNote)
{ {
if(!FlxG.save.data.downscroll) flipY = false;
switch (prevNote.noteData) switch (prevNote.noteData)
{ {
case 0: case 0:
@ -179,10 +178,6 @@ class Note extends FlxSprite
prevNote.scale.y *= Conductor.stepCrochet / 100 * 1.5 * FlxG.save.data.scrollSpeed; prevNote.scale.y *= Conductor.stepCrochet / 100 * 1.5 * FlxG.save.data.scrollSpeed;
else else
prevNote.scale.y *= Conductor.stepCrochet / 100 * 1.5 * PlayState.SONG.speed; prevNote.scale.y *= Conductor.stepCrochet / 100 * 1.5 * PlayState.SONG.speed;
prevNote.updateHitbox(); prevNote.updateHitbox();
// prevNote.setGraphicSize(); // prevNote.setGraphicSize();
} }

View File

@ -2202,23 +2202,13 @@ class PlayState extends MusicBeatState
daNote.y = (playerStrums.members[Math.floor(Math.abs(daNote.noteData))].y + 0.45 * (Conductor.songPosition - daNote.strumTime) * FlxMath.roundDecimal(FlxG.save.data.scrollSpeed == 1 ? SONG.speed : FlxG.save.data.scrollSpeed, 2)); daNote.y = (playerStrums.members[Math.floor(Math.abs(daNote.noteData))].y + 0.45 * (Conductor.songPosition - daNote.strumTime) * FlxMath.roundDecimal(FlxG.save.data.scrollSpeed == 1 ? SONG.speed : FlxG.save.data.scrollSpeed, 2));
else else
daNote.y = (strumLineNotes.members[Math.floor(Math.abs(daNote.noteData))].y + 0.45 * (Conductor.songPosition - daNote.strumTime) * FlxMath.roundDecimal(FlxG.save.data.scrollSpeed == 1 ? SONG.speed : FlxG.save.data.scrollSpeed, 2)); daNote.y = (strumLineNotes.members[Math.floor(Math.abs(daNote.noteData))].y + 0.45 * (Conductor.songPosition - daNote.strumTime) * FlxMath.roundDecimal(FlxG.save.data.scrollSpeed == 1 ? SONG.speed : FlxG.save.data.scrollSpeed, 2));
if(daNote.isSustainNote) if(daNote.isSustainNote)
{ {
daNote.y += daNote.frameHeight / 2; // Remember = minus makes notes go up, plus makes them go down
if(daNote.animation.curAnim.name.endsWith('end') && daNote.prevNote != null)
if(daNote.animation.curAnim.name.endsWith('holdend')) daNote.y += daNote.prevNote.height;
{ else
daNote.y = daNote.prevNote.y - daNote.offset.y * 2; daNote.y += daNote.height / 2;
if (daNote.prevNote.hit)
{
daNote.visible = false;
}
if(SONG.noteStyle == 'pixel')
daNote.y += daNote.offset.y * 2;
}
// If not in botplay, only clip sustain notes when properly hit, botplay gets to clip it everytime // If not in botplay, only clip sustain notes when properly hit, botplay gets to clip it everytime
if(!FlxG.save.data.botplay) if(!FlxG.save.data.botplay)
@ -2226,14 +2216,14 @@ class PlayState extends MusicBeatState
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)) 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 // Clip to strumline
var swagRect = new FlxRect(0, 0, daNote.frameWidth * 2, daNote.frameHeight * 4); var swagRect = new FlxRect(0, 0, daNote.frameWidth * 2, daNote.frameHeight * 2);
swagRect.height = (strumLineNotes.members[Math.floor(Math.abs(daNote.noteData))].y + Note.swagWidth / 2 - daNote.y) / daNote.scale.y; swagRect.height = (strumLineNotes.members[Math.floor(Math.abs(daNote.noteData))].y + Note.swagWidth / 2 - daNote.y) / daNote.scale.y;
swagRect.y = daNote.frameHeight - swagRect.height; swagRect.y = daNote.frameHeight - swagRect.height;
daNote.clipRect = swagRect; daNote.clipRect = swagRect;
} }
}else { }else {
var swagRect = new FlxRect(0, 0, daNote.frameWidth * 2, daNote.frameHeight * 4); var swagRect = new FlxRect(0, 0, daNote.frameWidth * 2, daNote.frameHeight * 2);
swagRect.height = (strumLineNotes.members[Math.floor(Math.abs(daNote.noteData))].y + Note.swagWidth / 2 - daNote.y) / daNote.scale.y; swagRect.height = (strumLineNotes.members[Math.floor(Math.abs(daNote.noteData))].y + Note.swagWidth / 2 - daNote.y) / daNote.scale.y;
swagRect.y = daNote.frameHeight - swagRect.height; swagRect.y = daNote.frameHeight - swagRect.height;
@ -2246,37 +2236,10 @@ class PlayState extends MusicBeatState
daNote.y = (playerStrums.members[Math.floor(Math.abs(daNote.noteData))].y - 0.45 * (Conductor.songPosition - daNote.strumTime) * FlxMath.roundDecimal(FlxG.save.data.scrollSpeed == 1 ? SONG.speed : FlxG.save.data.scrollSpeed, 2)); daNote.y = (playerStrums.members[Math.floor(Math.abs(daNote.noteData))].y - 0.45 * (Conductor.songPosition - daNote.strumTime) * FlxMath.roundDecimal(FlxG.save.data.scrollSpeed == 1 ? SONG.speed : FlxG.save.data.scrollSpeed, 2));
else else
daNote.y = (strumLineNotes.members[Math.floor(Math.abs(daNote.noteData))].y - 0.45 * (Conductor.songPosition - daNote.strumTime) * FlxMath.roundDecimal(FlxG.save.data.scrollSpeed == 1 ? SONG.speed : FlxG.save.data.scrollSpeed, 2)); daNote.y = (strumLineNotes.members[Math.floor(Math.abs(daNote.noteData))].y - 0.45 * (Conductor.songPosition - daNote.strumTime) * FlxMath.roundDecimal(FlxG.save.data.scrollSpeed == 1 ? SONG.speed : FlxG.save.data.scrollSpeed, 2));
if(daNote.isSustainNote) if(daNote.isSustainNote)
{ {
// Don't look at this goofy ass shit, my hatred for upscroll knows no bounds
// I personally love upscroll and I fixed this code - Kade
daNote.y += daNote.frameHeight / 2;
daNote.offset.y = -daNote.frameHeight - 15;
if(SONG.noteStyle == 'pixel')
daNote.y += daNote.height / 2;
daNote.y -= daNote.height / 2; daNote.y -= daNote.height / 2;
if(daNote.animation.curAnim.name.endsWith('holdend'))
{
daNote.y = daNote.prevNote.y + daNote.prevNote.height / 2 + daNote.frameHeight / 6;
daNote.offset.y = -daNote.prevNote.frameHeight + 6;
if (daNote.prevNote.hit)
{
daNote.y -= 50;
daNote.visible = false;
}
if(SONG.noteStyle == 'pixel')
daNote.y += daNote.offset.y / 2;
}
if(!FlxG.save.data.botplay) if(!FlxG.save.data.botplay)
{ {
if((!daNote.mustPress || daNote.wasGoodHit || daNote.prevNote.wasGoodHit && !daNote.canBeHit) && daNote.y + daNote.offset.y * daNote.scale.y <= (strumLine.y + Note.swagWidth / 2)) if((!daNote.mustPress || daNote.wasGoodHit || daNote.prevNote.wasGoodHit && !daNote.canBeHit) && daNote.y + daNote.offset.y * daNote.scale.y <= (strumLine.y + Note.swagWidth / 2))
@ -2299,6 +2262,7 @@ class PlayState extends MusicBeatState
} }
} }
if (!daNote.mustPress && daNote.wasGoodHit) if (!daNote.mustPress && daNote.wasGoodHit)
{ {
if (SONG.song != 'Tutorial') if (SONG.song != 'Tutorial')
@ -2355,10 +2319,8 @@ class PlayState extends MusicBeatState
daNote.active = false; daNote.active = false;
daNote.hit = true;
daNote.kill(); daNote.kill();
daNote.hit = true;
notes.remove(daNote, true); notes.remove(daNote, true);
daNote.destroy(); daNote.destroy();
} }
@ -2391,20 +2353,11 @@ 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.mustPress && daNote.tooLate && !FlxG.save.data.downscroll || daNote.mustPress && daNote.tooLate && FlxG.save.data.downscroll) && daNote.mustPress) if ((daNote.mustPress && daNote.tooLate && !FlxG.save.data.downscroll || daNote.mustPress && daNote.tooLate && FlxG.save.data.downscroll) && daNote.mustPress)
{
if (!daNote.visible)
{
notes.remove(daNote, true);
daNote.kill();
daNote.destroy();
}
else
{ {
if (daNote.isSustainNote && daNote.wasGoodHit) if (daNote.isSustainNote && daNote.wasGoodHit)
{ {
daNote.kill(); daNote.kill();
notes.remove(daNote, true); notes.remove(daNote, true);
daNote.destroy();
} }
else else
{ {
@ -2415,12 +2368,10 @@ class PlayState extends MusicBeatState
} }
daNote.visible = false; daNote.visible = false;
daNote.hit = true;
daNote.kill(); daNote.kill();
notes.remove(daNote, true); notes.remove(daNote, true);
daNote.destroy();
}
} }
}); });
} }
@ -2942,7 +2893,6 @@ class PlayState extends MusicBeatState
{ {
FlxG.log.add("killing dumb ass note at " + note.strumTime); FlxG.log.add("killing dumb ass note at " + note.strumTime);
note.kill(); note.kill();
note.hit = true;
notes.remove(note, true); notes.remove(note, true);
note.destroy(); note.destroy();
} }
@ -3258,7 +3208,6 @@ class PlayState extends MusicBeatState
vocals.volume = 1; vocals.volume = 1;
note.kill(); note.kill();
note.hit = true;
notes.remove(note, true); notes.remove(note, true);
note.destroy(); note.destroy();

View File

@ -1 +1,10 @@
1.4.2 1.5;
- Added toggle for ghost tapping
- Officially support macOS (and add macOS requirements to docs)
- Autoplay
- Clap assist for syncing charts
- Bring back R to reset, but now you can toggle it in the options
- You can now fully customize your keybinds
- Change how replays work + store scroll speed and direction in replays
- Opponent strumline now lights up when they hit a note, like the player's does
- Now using the new recharts from Funkin v0.2.8