check if server state is not loaded, and fix it

This commit is contained in:
Mister_Nebula 2022-06-09 17:10:24 +01:00
parent e1bc344c10
commit ce33d3290c

View File

@ -131,6 +131,21 @@ internal class ServerStateManager : MonoBehaviour
return;
}
if (_currentState == ServerState.NotLoaded
&& QSBSceneManager.IsInUniverse
&& QSBPlayerManager.LocalPlayer.State is ClientState.AliveInSolarSystem or ClientState.AliveInEye)
{
switch (QSBSceneManager.CurrentScene)
{
case OWScene.SolarSystem:
new ServerStateMessage(ServerState.InSolarSystem).Send();
break;
case OWScene.EyeOfTheUniverse:
new ServerStateMessage(ServerState.InEye).Send();
break;
}
}
if (_currentState == ServerState.WaitingForAllPlayersToReady)
{
if (QSBPlayerManager.PlayerList.All(x