2021-12-26 06:53:36 +00:00
|
|
|
|
using OWML.Common;
|
|
|
|
|
using QSB.ClientServerStateSync;
|
2022-02-05 10:50:13 +00:00
|
|
|
|
using QSB.ClientServerStateSync.Messages;
|
2021-08-08 19:01:21 +00:00
|
|
|
|
using QSB.Messaging;
|
|
|
|
|
using QSB.Utility;
|
|
|
|
|
|
2022-02-27 12:40:44 +00:00
|
|
|
|
namespace QSB.DeathSync.Messages
|
2021-08-08 19:01:21 +00:00
|
|
|
|
{
|
2022-02-27 12:40:44 +00:00
|
|
|
|
internal class StartLoopMessage : QSBMessage
|
2022-02-25 06:04:54 +00:00
|
|
|
|
{
|
2022-02-27 12:40:44 +00:00
|
|
|
|
public override void OnReceiveLocal() => OnReceiveRemote();
|
|
|
|
|
|
|
|
|
|
public override void OnReceiveRemote()
|
2021-08-08 19:01:21 +00:00
|
|
|
|
{
|
2022-02-27 12:40:44 +00:00
|
|
|
|
DebugLog.DebugWrite($" ~~~ LOOP START ~~~");
|
|
|
|
|
if (QSBSceneManager.CurrentScene == OWScene.SolarSystem)
|
|
|
|
|
{
|
|
|
|
|
new ClientStateMessage(ClientState.AliveInSolarSystem).Send();
|
|
|
|
|
}
|
|
|
|
|
else if (QSBSceneManager.CurrentScene == OWScene.EyeOfTheUniverse)
|
|
|
|
|
{
|
|
|
|
|
new ClientStateMessage(ClientState.AliveInEye).Send();
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
DebugLog.ToConsole($"Error - Got StartLoop event when not in universe!", MessageType.Error);
|
|
|
|
|
new ClientStateMessage(ClientState.NotLoaded).Send();
|
|
|
|
|
}
|
2021-08-08 19:01:21 +00:00
|
|
|
|
}
|
|
|
|
|
}
|
2021-12-23 06:26:53 +00:00
|
|
|
|
}
|