Skip to content

Commit

Permalink
Fix set minimum update for delta packets (maybe use clamp in future?)
Browse files Browse the repository at this point in the history
  • Loading branch information
michael-r-elp committed Aug 31, 2024
1 parent 85a7906 commit eced531
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions BeatTogether.DedicatedServer.Kernel/DedicatedInstance.cs
Original file line number Diff line number Diff line change
Expand Up @@ -380,7 +380,7 @@ public override void OnConnect(EndPoint endPoint)
new MpNodePoseSyncStatePacket
{
fullStateUpdateFrequency = Math.Max(_playerRegistry.GetMillisBetweenPoseSyncStateDeltaPackets(), 100L),
deltaUpdateFrequency = _playerRegistry.GetMillisBetweenPoseSyncStateDeltaPackets()
deltaUpdateFrequency = Math.Min(_playerRegistry.GetMillisBetweenPoseSyncStateDeltaPackets(), 200L)
},
new MpScoreSyncStatePacket
{
Expand Down Expand Up @@ -423,8 +423,8 @@ public override void OnConnect(EndPoint endPoint)
new MpNodePoseSyncStatePacket
{
fullStateUpdateFrequency = Math.Max(_playerRegistry.GetMillisBetweenPoseSyncStateDeltaPackets(), 100L),
deltaUpdateFrequency = _playerRegistry.GetMillisBetweenPoseSyncStateDeltaPackets()
},
deltaUpdateFrequency = Math.Min(_playerRegistry.GetMillisBetweenPoseSyncStateDeltaPackets(), 200L)
},
new MpScoreSyncStatePacket
{
fullStateUpdateFrequency = Math.Max(_playerRegistry.GetMillisBetweenScoreSyncStateDeltaPackets(), 500L),
Expand Down Expand Up @@ -586,7 +586,7 @@ public override void OnDisconnect(EndPoint endPoint)
new MpNodePoseSyncStatePacket
{
fullStateUpdateFrequency = Math.Max(_playerRegistry.GetMillisBetweenPoseSyncStateDeltaPackets(), 100L),
deltaUpdateFrequency = _playerRegistry.GetMillisBetweenPoseSyncStateDeltaPackets()
deltaUpdateFrequency = Math.Min(_playerRegistry.GetMillisBetweenPoseSyncStateDeltaPackets(), 200L)
},
new MpScoreSyncStatePacket
{
Expand Down

0 comments on commit eced531

Please sign in to comment.