mirror of
https://github.com/misternebula/quantum-space-buddies.git
synced 2025-01-26 09:35:26 +00:00
25 lines
538 B
C#
25 lines
538 B
C#
using QSB.AuthoritySync;
|
|
using QSB.Messaging;
|
|
using QSB.OrbSync.WorldObjects;
|
|
|
|
namespace QSB.OrbSync.Messages
|
|
{
|
|
public class OrbDragMessage : QSBWorldObjectMessage<QSBOrb, bool>
|
|
{
|
|
public OrbDragMessage(bool isDragging) => Value = isDragging;
|
|
|
|
public override void OnReceiveLocal()
|
|
{
|
|
if (QSBCore.IsHost && Value)
|
|
{
|
|
WorldObject.TransformSync.netIdentity.UpdateAuthQueue(From, AuthQueueAction.Force);
|
|
}
|
|
}
|
|
|
|
public override void OnReceiveRemote()
|
|
{
|
|
OnReceiveLocal();
|
|
WorldObject.SetDragging(Value);
|
|
}
|
|
}
|
|
} |