mirror of
https://github.com/misternebula/quantum-space-buddies.git
synced 2025-01-08 09:41:07 +00:00
27 lines
660 B
C#
27 lines
660 B
C#
using QSB.Messaging;
|
|
using QSB.Player;
|
|
using QSB.Player.TransformSync;
|
|
using QSB.QuantumSync;
|
|
|
|
namespace QSB.Tools.ProbeLauncherTool.Messages;
|
|
|
|
public class RemoveSnapshotMessage : QSBMessage
|
|
{
|
|
static RemoveSnapshotMessage()
|
|
=> GlobalMessenger.AddListener(OWEvents.ProbeSnapshotRemoved, Handle);
|
|
|
|
private static void Handle()
|
|
{
|
|
if (PlayerTransformSync.LocalInstance)
|
|
{
|
|
new RemoveSnapshotMessage().Send();
|
|
}
|
|
}
|
|
|
|
public override void OnReceiveLocal()
|
|
=> QuantumManager.OnRemoveProbeSnapshot(QSBPlayerManager.LocalPlayer);
|
|
|
|
public override void OnReceiveRemote()
|
|
=> QuantumManager.OnRemoveProbeSnapshot(QSBPlayerManager.GetPlayer(From));
|
|
}
|