@@ -50,6 +50,8 @@ public class MenuManager : MonoBehaviour, IAddComponentOnStart
5050
5151 private GameObject _choicePopupPrefab ;
5252
53+ public bool WillBeHost ;
54+
5355 public void Start ( )
5456 {
5557 Instance = this ;
@@ -606,6 +608,7 @@ private void PreHost()
606608 private void Host ( bool newMultiplayerSave )
607609 {
608610 QSBCore . IsInMultiplayer = true ;
611+ WillBeHost = true ;
609612
610613 if ( newMultiplayerSave )
611614 {
@@ -648,7 +651,11 @@ private void Host(bool newMultiplayerSave)
648651 LoadGame ( PlayerData . GetWarpedToTheEye ( ) ) ;
649652 // wait until scene load and then wait until Start has ran
650653 // 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+ } ) ;
652659 } ;
653660
654661 OpenInfoPopup ( string . Format ( QSBLocalization . Current . CopySteamIDToClipboard , steamId )
@@ -660,7 +667,11 @@ private void Host(bool newMultiplayerSave)
660667 LoadGame ( PlayerData . GetWarpedToTheEye ( ) ) ;
661668 // wait until scene load and then wait until Start has ran
662669 // 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+ } ) ;
664675 }
665676 }
666677
0 commit comments