Merge pull request #1556 from cuckydev/fixsusssssy
Fix sustain note clipping (FINALLY) and disable Daddy Dearest & Pico animation loops
This commit is contained in:
commit
33b069b597
@ -103,11 +103,11 @@ class Character extends FlxSprite
|
||||
// DAD ANIMATION LOADING CODE
|
||||
tex = Paths.getSparrowAtlas('DADDY_DEAREST','shared',true);
|
||||
frames = tex;
|
||||
animation.addByPrefix('idle', 'Dad idle dance', 24);
|
||||
animation.addByPrefix('singUP', 'Dad Sing Note UP', 24);
|
||||
animation.addByPrefix('singRIGHT', 'Dad Sing Note RIGHT', 24);
|
||||
animation.addByPrefix('singDOWN', 'Dad Sing Note DOWN', 24);
|
||||
animation.addByPrefix('singLEFT', 'Dad Sing Note LEFT', 24);
|
||||
animation.addByPrefix('idle', 'Dad idle dance', 24, false);
|
||||
animation.addByPrefix('singUP', 'Dad Sing Note UP', 24, false);
|
||||
animation.addByPrefix('singRIGHT', 'Dad Sing Note RIGHT', 24, false);
|
||||
animation.addByPrefix('singDOWN', 'Dad Sing Note DOWN', 24, false);
|
||||
animation.addByPrefix('singLEFT', 'Dad Sing Note LEFT', 24, false);
|
||||
|
||||
loadOffsetFile(curCharacter);
|
||||
|
||||
@ -181,7 +181,7 @@ class Character extends FlxSprite
|
||||
case 'pico':
|
||||
tex = Paths.getSparrowAtlas('Pico_FNF_assetss','shared',true);
|
||||
frames = tex;
|
||||
animation.addByPrefix('idle', "Pico Idle Dance", 24);
|
||||
animation.addByPrefix('idle', "Pico Idle Dance", 24, false);
|
||||
animation.addByPrefix('singUP', 'pico Up note0', 24, false);
|
||||
animation.addByPrefix('singDOWN', 'Pico Down Note0', 24, false);
|
||||
if (isPlayer)
|
||||
|
@ -2968,7 +2968,7 @@ class PlayState extends MusicBeatState
|
||||
// If not in botplay, only clip sustain notes when properly hit, botplay gets to clip it everytime
|
||||
if (!PlayStateChangeables.botPlay)
|
||||
{
|
||||
if ((!daNote.mustPress || daNote.wasGoodHit || daNote.prevNote.wasGoodHit && !daNote.canBeHit)
|
||||
if ((!daNote.mustPress || daNote.wasGoodHit || daNote.prevNote.wasGoodHit || holdArray[Math.floor(Math.abs(daNote.noteData))] && !daNote.tooLate)
|
||||
&& daNote.y - daNote.offset.y * daNote.scale.y + daNote.height >= (strumLine.y + Note.swagWidth / 2))
|
||||
{
|
||||
// Clip to strumline
|
||||
@ -3009,7 +3009,7 @@ class PlayState extends MusicBeatState
|
||||
|
||||
if (!PlayStateChangeables.botPlay)
|
||||
{
|
||||
if ((!daNote.mustPress || daNote.wasGoodHit || daNote.prevNote.wasGoodHit && !daNote.canBeHit)
|
||||
if ((!daNote.mustPress || daNote.wasGoodHit || daNote.prevNote.wasGoodHit || holdArray[Math.floor(Math.abs(daNote.noteData))] && !daNote.tooLate)
|
||||
&& daNote.y + daNote.offset.y * daNote.scale.y <= (strumLine.y + Note.swagWidth / 2))
|
||||
{
|
||||
// Clip to strumline
|
||||
@ -3121,7 +3121,13 @@ class PlayState extends MusicBeatState
|
||||
// WIP interpolation shit? Need to fix the pause issue
|
||||
// daNote.y = (strumLine.y - (songTime - daNote.strumTime) * (0.45 * PlayState.SONG.speed));
|
||||
|
||||
if ((daNote.mustPress && daNote.tooLate && !PlayStateChangeables.useDownscroll || daNote.mustPress && daNote.tooLate
|
||||
if (daNote.isSustainNote && daNote.wasGoodHit && Conductor.songPosition >= daNote.strumTime)
|
||||
{
|
||||
daNote.kill();
|
||||
notes.remove(daNote, true);
|
||||
daNote.destroy();
|
||||
}
|
||||
else if ((daNote.mustPress && daNote.tooLate && !PlayStateChangeables.useDownscroll || daNote.mustPress && daNote.tooLate
|
||||
&& PlayStateChangeables.useDownscroll)
|
||||
&& daNote.mustPress)
|
||||
{
|
||||
@ -4285,9 +4291,16 @@ class PlayState extends MusicBeatState
|
||||
}
|
||||
});
|
||||
|
||||
if (!note.isSustainNote)
|
||||
{
|
||||
note.kill();
|
||||
notes.remove(note, true);
|
||||
note.destroy();
|
||||
}
|
||||
else
|
||||
{
|
||||
note.wasGoodHit = true;
|
||||
}
|
||||
|
||||
updateAccuracy();
|
||||
}
|
||||
|
48
source/SusClip.hx
Normal file
48
source/SusClip.hx
Normal file
@ -0,0 +1,48 @@
|
||||
package;
|
||||
|
||||
import flixel.FlxG;
|
||||
import flixel.FlxSprite;
|
||||
import flixel.graphics.frames.FlxAtlasFrames;
|
||||
import flixel.math.FlxMath;
|
||||
import flixel.util.FlxColor;
|
||||
|
||||
import Note;
|
||||
|
||||
class SusClip extends FlxSprite
|
||||
{
|
||||
public var strumTime:Float = 0;
|
||||
public var noteData:Int = 0;
|
||||
public var mustPress:Bool = false;
|
||||
public var noteYOff:Int = 0;
|
||||
|
||||
public function new(note:Note)
|
||||
{
|
||||
super();
|
||||
|
||||
//Copy note data
|
||||
strumTime = note.strumTime;
|
||||
noteData = note.noteData;
|
||||
mustPress = note.mustPress;
|
||||
noteYOff = note.noteYOff;
|
||||
|
||||
x = note.x;
|
||||
y = note.y;
|
||||
alpha = note.alpha;
|
||||
loadGraphicFromSprite(note);
|
||||
|
||||
angle = note.angle;
|
||||
flipY = note.flipY;
|
||||
clipRect = note.clipRect;
|
||||
scale.copyFrom(note.scale);
|
||||
scrollFactor.copyFrom(note.scrollFactor);
|
||||
updateHitbox();
|
||||
}
|
||||
|
||||
/*
|
||||
override function update(elapsed:Float)
|
||||
{
|
||||
super.update(elapsed);
|
||||
angle = modAngle + localAngle;
|
||||
}
|
||||
*/
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user