diff --git a/QSB/EyeOfTheUniverse/EyeStateSync/Messages/EyeStateMessage.cs b/QSB/EyeOfTheUniverse/EyeStateSync/Messages/EyeStateMessage.cs index 90406d4d..4e762859 100644 --- a/QSB/EyeOfTheUniverse/EyeStateSync/Messages/EyeStateMessage.cs +++ b/QSB/EyeOfTheUniverse/EyeStateSync/Messages/EyeStateMessage.cs @@ -1,4 +1,5 @@ -using QSB.Messaging; +using QSB.Menus; +using QSB.Messaging; using QSB.Player; using QSB.Player.TransformSync; using QSB.WorldSync; @@ -25,12 +26,14 @@ namespace QSB.EyeOfTheUniverse.EyeStateSync.Messages public override void OnReceiveLocal() { QSBPlayerManager.LocalPlayer.EyeState = Value; + MenuManager.Instance.OnEyeStateChange(Value); } public override void OnReceiveRemote() { var player = QSBPlayerManager.GetPlayer(From); player.EyeState = Value; + MenuManager.Instance.OnEyeStateChange(Value); } } } \ No newline at end of file diff --git a/QSB/Menus/MenuManager.cs b/QSB/Menus/MenuManager.cs index e977f0a7..76039dc7 100644 --- a/QSB/Menus/MenuManager.cs +++ b/QSB/Menus/MenuManager.cs @@ -199,6 +199,14 @@ namespace QSB.Menus DisconnectPopup._labelText.text = popupText; } + public void OnEyeStateChange(EyeState state) + { + if (state >= EyeState.IntoTheVortex) + { + SetButtonActive(HostButton, false); + } + } + private void MakeTitleMenus() { CreateCommonPopups();