Skip to content

Commit

Permalink
fix wrongly named function
Browse files Browse the repository at this point in the history
  • Loading branch information
cubicgraphics committed May 14, 2024
1 parent f5acdda commit 0330223
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions BeatTogether.DedicatedServer.Kernel/PacketSource.cs
Original file line number Diff line number Diff line change
Expand Up @@ -118,24 +118,22 @@ public void OnReceive(EndPoint remoteEndPoint, ref SpanBuffer reader, IgnoranceC
{
if (_configuration.DisableNotes || (_playerRegistry.GetPlayerCount() >= _configuration.DisableNotesPlayerCount) && !_configuration.ForceEnableNotes)
return;
method = IgnoranceChannelTypes.Unthrottled;
break;
}
else if (packet is NodePoseSyncStatePacket)
{
if ((DateTime.UtcNow.Ticks - sender.TicksAtLastSyncState) / TimeSpan.TicksPerMillisecond < _playerRegistry.GetMillisBetweenSyncStatePackets())
if ((DateTime.UtcNow.Ticks - sender.TicksAtLastSyncState) / TimeSpan.TicksPerMillisecond < _playerRegistry.GetMillisBetweenPoseSyncStateDeltaPackets())
{
_logger.Verbose($"Skipping sync state packet from {sender.ConnectionId} (Secret='{sender.Instance._configuration.Secret}').");
//_logger.Verbose($"Skipping sync state packet from {sender.ConnectionId} (Secret='{sender.Instance._configuration.Secret}').");
return;
}
method = IgnoranceChannelTypes.Unthrottled;
sender.TicksAtLastSyncState = DateTime.UtcNow.Ticks;
}
else if (packet is NodePoseSyncStateDeltaPacket)
{
if ((DateTime.UtcNow.Ticks - sender.TicksAtLastSyncStateDelta) / TimeSpan.TicksPerMillisecond < _playerRegistry.GetMillisBetweenSyncStatePackets())
if ((DateTime.UtcNow.Ticks - sender.TicksAtLastSyncStateDelta) / TimeSpan.TicksPerMillisecond < _playerRegistry.GetMillisBetweenPoseSyncStateDeltaPackets())
{
_logger.Verbose($"Skipping sync state packet from {sender.ConnectionId} (Secret='{sender.Instance._configuration.Secret}').");
//_logger.Verbose($"Skipping sync state packet from {sender.ConnectionId} (Secret='{sender.Instance._configuration.Secret}').");
return;
}
sender.TicksAtLastSyncStateDelta = DateTime.UtcNow.Ticks;
Expand Down

0 comments on commit 0330223

Please sign in to comment.