mirror of
https://github.com/misternebula/quantum-space-buddies.git
synced 2025-01-08 09:41:07 +00:00
29 lines
867 B
C#
29 lines
867 B
C#
using QSB.ClientServerStateSync;
|
|
using QSB.Messaging;
|
|
using QSB.Utility;
|
|
|
|
namespace QSB.DeathSync.Messages
|
|
{
|
|
internal class StartLoopMessage : QSBMessage
|
|
{
|
|
public override void OnReceiveLocal() => OnReceiveRemote();
|
|
|
|
public override void OnReceiveRemote()
|
|
{
|
|
DebugLog.DebugWrite($" ~~~ LOOP START ~~~");
|
|
if (QSBSceneManager.CurrentScene == OWScene.SolarSystem)
|
|
{
|
|
ClientStateManager.Instance.SendChangeClientStateMessage(ClientState.AliveInSolarSystem);
|
|
}
|
|
else if (QSBSceneManager.CurrentScene == OWScene.EyeOfTheUniverse)
|
|
{
|
|
ClientStateManager.Instance.SendChangeClientStateMessage(ClientState.AliveInEye);
|
|
}
|
|
else
|
|
{
|
|
DebugLog.ToConsole($"Error - Got StartLoop event when not in universe!", OWML.Common.MessageType.Error);
|
|
ClientStateManager.Instance.SendChangeClientStateMessage(ClientState.NotLoaded);
|
|
}
|
|
}
|
|
}
|
|
} |