Skip to content

Commit

Permalink
Fixed preflight breaking on controller / using wasd
Browse files Browse the repository at this point in the history
  • Loading branch information
xen-42 committed Feb 23, 2024
1 parent 2cd9662 commit 94faca2
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions QSB/Menus/PreflightChecklistAdjustment.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
using System.Collections.Generic;
using System.Linq;
using UnityEngine;
using UnityEngine.UI;

namespace QSB.Menus;

Expand Down Expand Up @@ -53,9 +54,9 @@ public void Awake()
var settingsMenuView = GameObject.FindObjectOfType<SettingsMenuView>();
settingsMenuView._listSettingsOptions = DestroyFreezeTimeOptions(settingsMenuView._listSettingsOptions);
// This one also points to the same options, so just update the list to not have the old broken ones
// This one also points to the same options, have to remove the destroyed objects from it
var menuGameplayPreFlight = GameObject.Find("PauseMenu/OptionsCanvas/OptionsMenu-Panel/OptionsDisplayPanel/GameplayMenu/MenuGameplayPreFl/").GetComponent<Menu>();
menuGameplayPreFlight._menuOptions = settingsMenuView._listSettingsOptions;
Delay.RunNextFrame(() => menuGameplayPreFlight._menuOptions = menuGameplayPreFlight._menuOptions.Where(x => x != null).ToArray());
}
};
}
Expand Down

0 comments on commit 94faca2

Please sign in to comment.