mirror of
https://github.com/nolen777/eagle0.git
synced 2026-07-28 20:55:44 +00:00
Keep custom battle open during lobby updates (#8790)
This commit is contained in:
+6
-6
@@ -780,12 +780,12 @@ public class ConnectionHandler : MonoBehaviour, ILobbySubscriber, IDisposable {
|
||||
fetchedNewGameLeaders.AddRange(lobbyResponse.NewGameOptions.AvailableLeaders);
|
||||
|
||||
MainQueue.Q.Enqueue(() => {
|
||||
// Skip lobby UI updates if we've already left the connection UI.
|
||||
// The lobby response may arrive after the game has started (e.g., when creating a new
|
||||
// game), and the connection canvas is inactive, causing GetComponentInParent to fail.
|
||||
// This check must be inside the queue callback since the state may change between
|
||||
// when the response arrives and when this callback executes.
|
||||
if (!IsConnectionModeActive()) return;
|
||||
// Skip lobby UI updates if we've already left the connection UI or opened the custom
|
||||
// battle panel. A lobby response may already be in flight when either transition
|
||||
// happens, so it must not switch the visible panel back to the lobby.
|
||||
// This check must be inside the queue callback since the state may change between when
|
||||
// the response arrives and when this callback executes.
|
||||
if (!IsConnectionModeActive() || customBattlePanel.gameObject.activeSelf) return;
|
||||
|
||||
ResourceFetcher.headshotFetcher.Prefetch(
|
||||
fetchedNewGameLeaders.Select(a => a.ImagePath));
|
||||
|
||||
Reference in New Issue
Block a user