mirror of
https://github.com/ninjamuffin99/Funkin.git
synced 2025-07-09 21:06:36 +00:00
Crash fix for Stress
This commit is contained in:
parent
0b17f74f48
commit
e4e516dd30
|
@ -832,10 +832,6 @@ class PlayState extends MusicBeatState implements IHook
|
||||||
// swagNote.data = songNotes;
|
// swagNote.data = songNotes;
|
||||||
swagNote.data.sustainLength = songNotes.sustainLength;
|
swagNote.data.sustainLength = songNotes.sustainLength;
|
||||||
swagNote.data.altNote = songNotes.altNote;
|
swagNote.data.altNote = songNotes.altNote;
|
||||||
<<<<<<< HEAD
|
|
||||||
=======
|
|
||||||
|
|
||||||
>>>>>>> origin/master
|
|
||||||
swagNote.scrollFactor.set(0, 0);
|
swagNote.scrollFactor.set(0, 0);
|
||||||
|
|
||||||
var susLength:Float = swagNote.data.sustainLength;
|
var susLength:Float = swagNote.data.sustainLength;
|
||||||
|
@ -941,11 +937,7 @@ class PlayState extends MusicBeatState implements IHook
|
||||||
regenNoteData(); // loads the note data from start
|
regenNoteData(); // loads the note data from start
|
||||||
health = 1;
|
health = 1;
|
||||||
songScore = 0;
|
songScore = 0;
|
||||||
<<<<<<< HEAD
|
|
||||||
Countdown.performCountdown(currentStageId.startsWith('school'));
|
Countdown.performCountdown(currentStageId.startsWith('school'));
|
||||||
=======
|
|
||||||
restartCountdownTimer();
|
|
||||||
>>>>>>> origin/master
|
|
||||||
|
|
||||||
needsReset = false;
|
needsReset = false;
|
||||||
}
|
}
|
||||||
|
@ -1261,19 +1253,11 @@ class PlayState extends MusicBeatState implements IHook
|
||||||
// TODO: Why the hell is the noteMiss logic in two different places?
|
// TODO: Why the hell is the noteMiss logic in two different places?
|
||||||
if (daNote.tooLate)
|
if (daNote.tooLate)
|
||||||
{
|
{
|
||||||
<<<<<<< HEAD
|
|
||||||
var event:NoteScriptEvent = new NoteScriptEvent(ScriptEvent.NOTE_MISS, daNote, true);
|
var event:NoteScriptEvent = new NoteScriptEvent(ScriptEvent.NOTE_MISS, daNote, true);
|
||||||
dispatchEvent(event);
|
dispatchEvent(event);
|
||||||
health -= 0.0775;
|
|
||||||
=======
|
|
||||||
if (curStage != null)
|
|
||||||
{
|
|
||||||
curStage.onNoteMiss(daNote);
|
|
||||||
}
|
|
||||||
|
|
||||||
// lose less health on sustain notes!
|
// lose less health on sustain notes!
|
||||||
health -= 0.0775 * (daNote.isSustainNote ? 0.2 : 1); // if it's sustain, multiply it by 0.2 (not checked for balence yet), else keep it same (multiply by 1)
|
health -= 0.0775 * (daNote.isSustainNote ? 0.2 : 1); // if it's sustain, multiply it by 0.2 (not checked for balence yet), else keep it same (multiply by 1)
|
||||||
>>>>>>> origin/master
|
|
||||||
vocals.volume = 0;
|
vocals.volume = 0;
|
||||||
killCombo();
|
killCombo();
|
||||||
}
|
}
|
||||||
|
@ -1541,15 +1525,9 @@ class PlayState extends MusicBeatState implements IHook
|
||||||
switch (currentStageId)
|
switch (currentStageId)
|
||||||
{
|
{
|
||||||
case 'limo':
|
case 'limo':
|
||||||
<<<<<<< HEAD
|
|
||||||
cameraFollowPoint.x = currentStage.getBoyfriend().getMidpoint().x - 300;
|
cameraFollowPoint.x = currentStage.getBoyfriend().getMidpoint().x - 300;
|
||||||
case 'mall':
|
case 'mall':
|
||||||
cameraFollowPoint.y = currentStage.getBoyfriend().getMidpoint().y - 200;
|
cameraFollowPoint.y = currentStage.getBoyfriend().getMidpoint().y - 200;
|
||||||
=======
|
|
||||||
camFollow.x = boyfriend.getMidpoint().x - 300;
|
|
||||||
case 'mallXmas':
|
|
||||||
camFollow.y = boyfriend.getMidpoint().y - 200;
|
|
||||||
>>>>>>> origin/master
|
|
||||||
case 'school' | 'schoolEvil':
|
case 'school' | 'schoolEvil':
|
||||||
cameraFollowPoint.x = currentStage.getBoyfriend().getMidpoint().x - 200;
|
cameraFollowPoint.x = currentStage.getBoyfriend().getMidpoint().x - 200;
|
||||||
cameraFollowPoint.y = currentStage.getBoyfriend().getMidpoint().y - 200;
|
cameraFollowPoint.y = currentStage.getBoyfriend().getMidpoint().y - 200;
|
||||||
|
@ -1742,17 +1720,8 @@ class PlayState extends MusicBeatState implements IHook
|
||||||
if (!super.stepHit())
|
if (!super.stepHit())
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
<<<<<<< HEAD
|
|
||||||
if (Math.abs(FlxG.sound.music.time - (Conductor.songPosition - Conductor.offset)) > 20
|
|
||||||
|| (currentSong.needsVoices && Math.abs(vocals.time - (Conductor.songPosition - Conductor.offset)) > 20))
|
|
||||||
=======
|
|
||||||
override function stepHit()
|
|
||||||
{
|
|
||||||
super.stepHit();
|
|
||||||
|
|
||||||
if (Math.abs(FlxG.sound.music.time - (Conductor.songPosition - Conductor.offset)) > 20
|
if (Math.abs(FlxG.sound.music.time - (Conductor.songPosition - Conductor.offset)) > 20
|
||||||
|| Math.abs(vocals.checkSyncError(Conductor.songPosition - Conductor.offset)) > 20)
|
|| Math.abs(vocals.checkSyncError(Conductor.songPosition - Conductor.offset)) > 20)
|
||||||
>>>>>>> origin/master
|
|
||||||
{
|
{
|
||||||
resyncVocals();
|
resyncVocals();
|
||||||
}
|
}
|
||||||
|
|
|
@ -321,33 +321,45 @@ class Stage extends FlxSpriteGroup implements IHook implements IPlayStateScripte
|
||||||
|
|
||||||
for (prop in this.namedProps)
|
for (prop in this.namedProps)
|
||||||
{
|
{
|
||||||
remove(prop);
|
if (prop != null)
|
||||||
prop.kill();
|
{
|
||||||
prop.destroy();
|
remove(prop);
|
||||||
|
prop.kill();
|
||||||
|
prop.destroy();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
namedProps.clear();
|
namedProps.clear();
|
||||||
|
|
||||||
for (char in this.characters)
|
for (char in this.characters)
|
||||||
{
|
{
|
||||||
remove(char);
|
if (char != null)
|
||||||
char.kill();
|
{
|
||||||
char.destroy();
|
remove(char);
|
||||||
|
char.kill();
|
||||||
|
char.destroy();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
characters.clear();
|
characters.clear();
|
||||||
|
|
||||||
for (bopper in boppers)
|
for (bopper in boppers)
|
||||||
{
|
{
|
||||||
remove(bopper);
|
if (bopper != null)
|
||||||
bopper.kill();
|
{
|
||||||
bopper.destroy();
|
remove(bopper);
|
||||||
|
bopper.kill();
|
||||||
|
bopper.destroy();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
boppers = [];
|
boppers = [];
|
||||||
|
|
||||||
for (sprite in this.group)
|
for (sprite in this.group)
|
||||||
{
|
{
|
||||||
remove(sprite);
|
if (sprite != null)
|
||||||
sprite.kill();
|
{
|
||||||
sprite.destroy();
|
sprite.kill();
|
||||||
|
sprite.destroy();
|
||||||
|
remove(sprite);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
group.clear();
|
group.clear();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue