@@ -50,6 +50,8 @@ public class MenuManager : MonoBehaviour, IAddComponentOnStart
50
50
51
51
private GameObject _choicePopupPrefab ;
52
52
53
+ public bool WillBeHost ;
54
+
53
55
public void Start ( )
54
56
{
55
57
Instance = this ;
@@ -606,6 +608,7 @@ private void PreHost()
606
608
private void Host ( bool newMultiplayerSave )
607
609
{
608
610
QSBCore . IsInMultiplayer = true ;
611
+ WillBeHost = true ;
609
612
610
613
if ( newMultiplayerSave )
611
614
{
@@ -648,7 +651,11 @@ private void Host(bool newMultiplayerSave)
648
651
LoadGame ( PlayerData . GetWarpedToTheEye ( ) ) ;
649
652
// wait until scene load and then wait until Start has ran
650
653
// why is this done? GameStateMessage etc works on title screen since nonhost has to deal with that
651
- Delay . RunWhen ( ( ) => TimeLoop . _initialized , QSBNetworkManager . singleton . StartHost ) ;
654
+ Delay . RunWhen ( ( ) => TimeLoop . _initialized , ( ) =>
655
+ {
656
+ QSBNetworkManager . singleton . StartHost ( ) ;
657
+ Delay . RunWhen ( ( ) => NetworkServer . active , ( ) => WillBeHost = false ) ;
658
+ } ) ;
652
659
} ;
653
660
654
661
OpenInfoPopup ( string . Format ( QSBLocalization . Current . CopySteamIDToClipboard , steamId )
@@ -660,7 +667,11 @@ private void Host(bool newMultiplayerSave)
660
667
LoadGame ( PlayerData . GetWarpedToTheEye ( ) ) ;
661
668
// wait until scene load and then wait until Start has ran
662
669
// why is this done? GameStateMessage etc works on title screen since nonhost has to deal with that
663
- Delay . RunWhen ( ( ) => TimeLoop . _initialized , QSBNetworkManager . singleton . StartHost ) ;
670
+ Delay . RunWhen ( ( ) => TimeLoop . _initialized , ( ) =>
671
+ {
672
+ QSBNetworkManager . singleton . StartHost ( ) ;
673
+ Delay . RunWhen ( ( ) => NetworkServer . active , ( ) => WillBeHost = false ) ;
674
+ } ) ;
664
675
}
665
676
}
666
677
0 commit comments