mirror of
https://github.com/misternebula/quantum-space-buddies.git
synced 2025-02-23 15:40:43 +00:00
27 lines
662 B
C#
27 lines
662 B
C#
|
using QSB.Messaging;
|
|||
|
using QSB.Player;
|
|||
|
using QSB.Player.TransformSync;
|
|||
|
using QSB.QuantumSync;
|
|||
|
|
|||
|
namespace QSB.Tools.ProbeLauncherTool.Messages;
|
|||
|
|
|||
|
internal 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));
|
|||
|
}
|