mirror of
https://github.com/misternebula/quantum-space-buddies.git
synced 2025-01-03 17:38:30 +00:00
30 lines
874 B
C#
30 lines
874 B
C#
using OWML.Common;
|
|
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!", MessageType.Error);
|
|
ClientStateManager.Instance.SendChangeClientStateMessage(ClientState.NotLoaded);
|
|
}
|
|
}
|
|
}
|
|
} |