-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added score sync state packet and lowered the frequency of sync state…
… packets
- Loading branch information
1 parent
3628d6b
commit e251152
Showing
4 changed files
with
66 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
24 changes: 24 additions & 0 deletions
24
...icatedServer.Messaging/Packets/MultiplayerSession/MpCorePackets/MpScoreSyncStatePacket.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
using BeatTogether.Extensions; | ||
using BeatTogether.DedicatedServer.Messaging.Abstractions; | ||
using BeatTogether.DedicatedServer.Messaging.Util; | ||
|
||
namespace BeatTogether.DedicatedServer.Messaging.Packets.MultiplayerSession.MpCorePackets | ||
{ | ||
public sealed class MpScoreSyncStatePacket : INetSerializable | ||
{ | ||
public long deltaUpdateFrequency; | ||
public long fullStateUpdateFrequency; | ||
|
||
public void WriteTo(ref SpanBuffer bufferWriter) | ||
{ | ||
bufferWriter.WriteVarLong(deltaUpdateFrequency); | ||
bufferWriter.WriteVarLong(fullStateUpdateFrequency); | ||
} | ||
public void ReadFrom(ref SpanBuffer bufferReader) | ||
{ | ||
deltaUpdateFrequency = bufferReader.ReadVarLong(); | ||
fullStateUpdateFrequency = bufferReader.ReadVarLong(); | ||
} | ||
} | ||
|
||
} |