Fixed controls crash

This commit is contained in:
Yoshman29
2023-04-15 17:02:06 +02:00
parent 419ef50c0a
commit cbd7e0a3f5
4 changed files with 16 additions and 4 deletions
+5 -1
View File
@@ -5,6 +5,10 @@ echo Commiting with the message %1...
echo ==============================
git commit -a -m %1
echo ==============================
echo Pushing...
echo Pushing to dev repo...
echo ==============================
git push -u origin dev
echo ==============================
echo Pushing to public repo...
echo ==============================
git push -u origin main
+3 -1
View File
@@ -13,7 +13,9 @@ class FunkinSave {
public static var highscores:Map<HighscoreEntry, SongScore> = [];
// STUFF
/**
* ONLY OPEN IF YOU WANT TO EDIT FUNCTIONS RELATED TO SAVING, LOADING OR HIGHSCORES.
*/
#if REGION
@:dox(hide) @:doNotSave
private static var __eventAdded = false;
+2 -1
View File
@@ -253,7 +253,8 @@ class MusicBeatSubstate extends FlxSubState implements IBeatReceiver
if (subState != null && subState is MusicBeatSubstate) {
cast(subState, MusicBeatSubstate).parent = this;
super.resetSubState();
cast(subState, MusicBeatSubstate).onSubstateOpen();
if (subState != null)
cast(subState, MusicBeatSubstate).onSubstateOpen();
return;
}
super.resetSubState();
+6 -1
View File
@@ -6,6 +6,8 @@ import funkin.utils.FunkinParentDisabler;
class MusicBeatTransition extends MusicBeatSubstate {
var nextFrameSkip:Bool = false;
public var transitionTween:FlxTween = null;
public var transitionCamera:FlxCamera;
public var newState:FlxState;
@@ -45,7 +47,7 @@ class MusicBeatTransition extends MusicBeatSubstate {
add(transitionSprite);
transitionCamera.scroll.y = transitionCamera.height;
FlxTween.tween(transitionCamera.scroll, {y: -transitionCamera.height}, 2/3, {
transitionTween = FlxTween.tween(transitionCamera.scroll, {y: -transitionCamera.height}, 2/3, {
ease: FlxEase.sineOut,
onComplete: function(_) {
finish();
@@ -79,6 +81,9 @@ class MusicBeatTransition extends MusicBeatSubstate {
}
public override function destroy() {
if (transitionTween != null)
transitionTween.cancel();
transitionTween = FlxDestroyUtil.destroy(transitionTween);
if (newState == null && FlxG.cameras.list.contains(transitionCamera))
FlxG.cameras.remove(transitionCamera);
else