wip
This commit is contained in:
@@ -17,7 +17,6 @@
|
||||
using NLog;
|
||||
using Ragon.Protocol;
|
||||
using Ragon.Server.Lobby;
|
||||
using Ragon.Server.Plugin;
|
||||
using Ragon.Server.Plugin.Web;
|
||||
|
||||
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
|
||||
using NLog;
|
||||
using Ragon.Protocol;
|
||||
using Ragon.Server.Entity;
|
||||
using Ragon.Server.Event;
|
||||
|
||||
namespace Ragon.Server.Handler;
|
||||
|
||||
|
||||
@@ -29,7 +29,7 @@ public sealed class EntityOwnershipOperation : IRagonOperation
|
||||
|
||||
if (!room.Players.TryGetValue(playerPeerId, out var nextOwner))
|
||||
{
|
||||
_logger.Error($"Player not found with id {entityId}");
|
||||
_logger.Error($"Player not found with id {playerPeerId}");
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
using Ragon.Protocol;
|
||||
|
||||
namespace Ragon.Server.Handler;
|
||||
|
||||
public class TimestampSyncOperation: IRagonOperation
|
||||
{
|
||||
public void Handle(RagonContext context, RagonBuffer reader, RagonBuffer writer)
|
||||
{
|
||||
var timestamp0 = reader.Read(32);
|
||||
var timestamp1 = reader.Read(32);
|
||||
var value = new DoubleToUInt() { Int0 = timestamp0, Int1 = timestamp1 };
|
||||
|
||||
context.RoomPlayer?.SetTimestamp(value.Double);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user