mirror of
https://github.com/misternebula/quantum-space-buddies.git
synced 2025-01-26 09:35:26 +00:00
24 lines
641 B
C#
24 lines
641 B
C#
using QSB.Messaging;
|
|
using QSB.TransformSync;
|
|
|
|
namespace QSB.Events
|
|
{
|
|
class PlayerStatesRequestEvent : QSBEvent<PlayerMessage>
|
|
{
|
|
public override MessageType Type => MessageType.FullStateRequest;
|
|
|
|
public override void SetupListener()
|
|
{
|
|
GlobalMessenger.AddListener("QSBPlayerStatesRequest", () => SendEvent(
|
|
new PlayerMessage {
|
|
SenderId = PlayerTransformSync.LocalInstance.netId.Value
|
|
}));
|
|
}
|
|
|
|
public override void OnServerReceive(PlayerMessage message)
|
|
{
|
|
PlayerState.LocalInstance.Send();
|
|
}
|
|
}
|
|
}
|