This commit is contained in:
KadeDeveloper
2021-08-04 13:53:55 -07:00
22 changed files with 111 additions and 235 deletions

View File

@ -538,10 +538,7 @@ class PlayState extends MusicBeatState
halloweenBG.animation.addByPrefix('idle', 'halloweem bg0');
halloweenBG.animation.addByPrefix('lightning', 'halloweem bg lightning strike', 24, false);
halloweenBG.animation.play('idle');
if(FlxG.save.data.antialiasing)
{
halloweenBG.antialiasing = true;
}
halloweenBG.antialiasing = FlxG.save.data.antialiasing;
add(halloweenBG);
isHalloween = true;
@ -573,10 +570,7 @@ class PlayState extends MusicBeatState
light.visible = false;
light.setGraphicSize(Std.int(light.width * 0.85));
light.updateHitbox();
if(FlxG.save.data.antialiasing)
{
light.antialiasing = true;
}
light.antialiasing = FlxG.save.data.antialiasing;
phillyCityLights.add(light);
}
@ -604,6 +598,7 @@ class PlayState extends MusicBeatState
var skyBG:FlxSprite = new FlxSprite(-120, -50).loadGraphic(Paths.image('limo/limoSunset', 'week4'));
skyBG.scrollFactor.set(0.1, 0.1);
skyBG.antialiasing = FlxG.save.data.antialiasing;
add(skyBG);
var bgLimo:FlxSprite = new FlxSprite(-200, 480);
@ -611,6 +606,7 @@ class PlayState extends MusicBeatState
bgLimo.animation.addByPrefix('drive', "background limo pink", 24);
bgLimo.animation.play('drive');
bgLimo.scrollFactor.set(0.4, 0.4);
bgLimo.antialiasing = FlxG.save.data.antialiasing;
add(bgLimo);
if (FlxG.save.data.distractions)
{
@ -641,12 +637,10 @@ class PlayState extends MusicBeatState
limo.frames = limoTex;
limo.animation.addByPrefix('drive', "Limo stage", 24);
limo.animation.play('drive');
if(FlxG.save.data.antialiasing)
{
limo.antialiasing = true;
}
limo.antialiasing = FlxG.save.data.antialiasing;
fastCar = new FlxSprite(-300, 160).loadGraphic(Paths.image('limo/fastCarLol', 'week4'));
fastCar.antialiasing = FlxG.save.data.antialiasing;
// add(limo);
}
case 'mall':
@ -656,10 +650,7 @@ class PlayState extends MusicBeatState
defaultCamZoom = 0.80;
var bg:FlxSprite = new FlxSprite(-1000, -500).loadGraphic(Paths.image('christmas/bgWalls', 'week5'));
if(FlxG.save.data.antialiasing)
{
bg.antialiasing = true;
}
bg.antialiasing = FlxG.save.data.antialiasing;
bg.scrollFactor.set(0.2, 0.2);
bg.active = false;
bg.setGraphicSize(Std.int(bg.width * 0.8));
@ -669,10 +660,7 @@ class PlayState extends MusicBeatState
upperBoppers = new FlxSprite(-240, -90);
upperBoppers.frames = Paths.getSparrowAtlas('christmas/upperBop', 'week5');
upperBoppers.animation.addByPrefix('bop', "Upper Crowd Bob", 24, false);
if(FlxG.save.data.antialiasing)
{
upperBoppers.antialiasing = true;
}
upperBoppers.antialiasing = FlxG.save.data.antialiasing;
upperBoppers.scrollFactor.set(0.33, 0.33);
upperBoppers.setGraphicSize(Std.int(upperBoppers.width * 0.85));
upperBoppers.updateHitbox();
@ -682,10 +670,7 @@ class PlayState extends MusicBeatState
}
var bgEscalator:FlxSprite = new FlxSprite(-1100, -600).loadGraphic(Paths.image('christmas/bgEscalator', 'week5'));
if(FlxG.save.data.antialiasing)
{
bgEscalator.antialiasing = true;
}
bgEscalator.antialiasing = FlxG.save.data.antialiasing;
bgEscalator.scrollFactor.set(0.3, 0.3);
bgEscalator.active = false;
bgEscalator.setGraphicSize(Std.int(bgEscalator.width * 0.9));
@ -693,20 +678,14 @@ class PlayState extends MusicBeatState
add(bgEscalator);
var tree:FlxSprite = new FlxSprite(370, -250).loadGraphic(Paths.image('christmas/christmasTree', 'week5'));
if(FlxG.save.data.antialiasing)
{
tree.antialiasing = true;
}
tree.antialiasing = FlxG.save.data.antialiasing;
tree.scrollFactor.set(0.40, 0.40);
add(tree);
bottomBoppers = new FlxSprite(-300, 140);
bottomBoppers.frames = Paths.getSparrowAtlas('christmas/bottomBop', 'week5');
bottomBoppers.animation.addByPrefix('bop', 'Bottom Level Boppers', 24, false);
if(FlxG.save.data.antialiasing)
{
bottomBoppers.antialiasing = true;
}
bottomBoppers.antialiasing = FlxG.save.data.antialiasing;
bottomBoppers.scrollFactor.set(0.9, 0.9);
bottomBoppers.setGraphicSize(Std.int(bottomBoppers.width * 1));
bottomBoppers.updateHitbox();
@ -717,19 +696,13 @@ class PlayState extends MusicBeatState
var fgSnow:FlxSprite = new FlxSprite(-600, 700).loadGraphic(Paths.image('christmas/fgSnow', 'week5'));
fgSnow.active = false;
if(FlxG.save.data.antialiasing)
{
fgSnow.antialiasing = true;
}
fgSnow.antialiasing = FlxG.save.data.antialiasing;
add(fgSnow);
santa = new FlxSprite(-840, 150);
santa.frames = Paths.getSparrowAtlas('christmas/santa', 'week5');
santa.animation.addByPrefix('idle', 'santa idle in fear', 24, false);
if(FlxG.save.data.antialiasing)
{
santa.antialiasing = true;
}
santa.antialiasing = FlxG.save.data.antialiasing;
if (FlxG.save.data.distractions)
{
add(santa);
@ -739,10 +712,7 @@ class PlayState extends MusicBeatState
{
curStage = 'mallEvil';
var bg:FlxSprite = new FlxSprite(-400, -500).loadGraphic(Paths.image('christmas/evilBG', 'week5'));
if(FlxG.save.data.antialiasing)
{
bg.antialiasing = true;
}
bg.antialiasing = FlxG.save.data.antialiasing;
bg.scrollFactor.set(0.2, 0.2);
bg.active = false;
bg.setGraphicSize(Std.int(bg.width * 0.8));
@ -750,18 +720,12 @@ class PlayState extends MusicBeatState
add(bg);
var evilTree:FlxSprite = new FlxSprite(300, -300).loadGraphic(Paths.image('christmas/evilTree', 'week5'));
if(FlxG.save.data.antialiasing)
{
evilTree.antialiasing = true;
}
evilTree.antialiasing = FlxG.save.data.antialiasing;
evilTree.scrollFactor.set(0.2, 0.2);
add(evilTree);
var evilSnow:FlxSprite = new FlxSprite(-200, 700).loadGraphic(Paths.image("christmas/evilSnow", 'week5'));
if(FlxG.save.data.antialiasing)
{
evilSnow.antialiasing = true;
}
evilSnow.antialiasing = FlxG.save.data.antialiasing;
add(evilSnow);
}
case 'school':
@ -901,10 +865,7 @@ class PlayState extends MusicBeatState
defaultCamZoom = 0.9;
curStage = 'stage';
var bg:FlxSprite = new FlxSprite(-600, -200).loadGraphic(Paths.image('stageback'));
if(FlxG.save.data.antialiasing)
{
bg.antialiasing = true;
}
bg.antialiasing = FlxG.save.data.antialiasing;
bg.scrollFactor.set(0.9, 0.9);
bg.active = false;
add(bg);
@ -912,10 +873,7 @@ class PlayState extends MusicBeatState
var stageFront:FlxSprite = new FlxSprite(-650, 600).loadGraphic(Paths.image('stagefront'));
stageFront.setGraphicSize(Std.int(stageFront.width * 1.1));
stageFront.updateHitbox();
if(FlxG.save.data.antialiasing)
{
stageFront.antialiasing = true;
}
stageFront.antialiasing = FlxG.save.data.antialiasing;
stageFront.scrollFactor.set(0.9, 0.9);
stageFront.active = false;
add(stageFront);
@ -923,10 +881,7 @@ class PlayState extends MusicBeatState
var stageCurtains:FlxSprite = new FlxSprite(-500, -300).loadGraphic(Paths.image('stagecurtains'));
stageCurtains.setGraphicSize(Std.int(stageCurtains.width * 0.9));
stageCurtains.updateHitbox();
if(FlxG.save.data.antialiasing)
{
stageCurtains.antialiasing = true;
}
stageCurtains.antialiasing = FlxG.save.data.antialiasing;
stageCurtains.scrollFactor.set(1.3, 1.3);
stageCurtains.active = false;
@ -2079,10 +2034,7 @@ class PlayState extends MusicBeatState
babyArrow.x += Note.swagWidth * i;
if(FlxG.save.data.antialiasing)
{
babyArrow.antialiasing = true;
}
babyArrow.antialiasing = FlxG.save.data.antialiasing;
babyArrow.setGraphicSize(Std.int(babyArrow.width * 0.7));
}
@ -2995,7 +2947,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
@ -3036,7 +2988,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
@ -3148,7 +3100,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)
{
@ -3624,15 +3582,9 @@ class PlayState extends MusicBeatState
if (!curStage.startsWith('school'))
{
rating.setGraphicSize(Std.int(rating.width * 0.7));
if(FlxG.save.data.antialiasing)
{
rating.antialiasing = true;
}
rating.antialiasing = FlxG.save.data.antialiasing;
comboSpr.setGraphicSize(Std.int(comboSpr.width * 0.7));
if(FlxG.save.data.antialiasing)
{
comboSpr.antialiasing = true;
}
comboSpr.antialiasing = FlxG.save.data.antialiasing;
}
else
{
@ -3681,10 +3633,7 @@ class PlayState extends MusicBeatState
if (!curStage.startsWith('school'))
{
if(FlxG.save.data.antialiasing)
{
numScore.antialiasing = true;
}
numScore.antialiasing = FlxG.save.data.antialiasing;
numScore.setGraphicSize(Std.int(numScore.width * 0.5));
}
else
@ -4312,9 +4261,16 @@ class PlayState extends MusicBeatState
}
});
note.kill();
notes.remove(note, true);
note.destroy();
if (!note.isSustainNote)
{
note.kill();
notes.remove(note, true);
note.destroy();
}
else
{
note.wasGoodHit = true;
}
updateAccuracy();
}