This commit is contained in:
2024-09-28 20:11:56 +03:00
parent 5136f08dab
commit 672bb1ff6d
95 changed files with 741 additions and 601 deletions
@@ -19,18 +19,18 @@ using Ragon.Server.IO;
namespace Ragon.Server.Handler;
public class TimestampSyncOperation: BaseOperation
public class TimestampSyncOperation : BaseOperation
{
public TimestampSyncOperation(RagonBuffer reader, RagonBuffer writer) : base(reader, writer)
public TimestampSyncOperation(RagonStream reader, RagonStream writer) : base(reader, writer)
{
}
public override void Handle(RagonContext context, NetworkChannel channel)
{
var timestamp0 = Reader.Read(32);
var timestamp1 = Reader.Read(32);
var timestamp0 = (uint)Reader.ReadInt();
var timestamp1 = (uint)Reader.ReadInt();
var value = new DoubleToUInt() { Int0 = timestamp0, Int1 = timestamp1 };
context.RoomPlayer?.SetTimestamp(value.Double);
}
}