1
0
Fork 0
mirror of https://github.com/ninjamuffin99/Funkin.git synced 2024-12-28 07:56:46 +00:00

[BUGFIX] Fix an issue where PlayState would crash after the second song. (#216)

* Ignore blank lines in intro text

* Add a check when trying to render destroyed graphics.

* Persist noteSplash graphic so it isn't destroyed.
This commit is contained in:
Eric 2023-11-20 10:42:23 -05:00 committed by GitHub
parent 0e21220e24
commit 260f1bd265
3 changed files with 4 additions and 2 deletions

View file

@ -11,7 +11,7 @@
"name": "flixel",
"type": "git",
"dir": null,
"ref": "32cee07a0e5f21e590a4b21234603b2cd5898b10",
"ref": "8437a86aa5dafdb3f5dcb91d212cb10a4ee6e53b",
"url": "https://github.com/EliteMasterEric/flixel"
},
{

View file

@ -17,6 +17,7 @@ class NoteSplash extends FlxSprite
public static function preloadFrames():Void
{
frameCollection = Paths.getSparrowAtlas('noteSplashes');
frameCollection.parent.persist = true;
}
public function new()

View file

@ -232,7 +232,8 @@ class TitleState extends MusicBeatState
{
var fullText:String = Assets.getText(Paths.txt('introText'));
var firstArray:Array<String> = fullText.split('\n');
// Split into lines and remove empty lines
var firstArray:Array<String> = fullText.split('\n').filter(function(s:String) return s != '');
var swagGoodArray:Array<Array<String>> = [];
for (i in firstArray)